public DefaultAppContext(String applicationName) { this(applicationName, new JFrame(applicationName), new ProductManager(), new DefaultPropertyMap()); }
/** * Constructor. * <p> * As this class is a registered service, the constructor is not supposed to be called directly. */ public SnapApp() { productManager = new ProductManager(); // Register a provider that delivers an UndoManager for a Product instance. UndoManagerProvider undoManagerProvider = new UndoManagerProvider(); ExtensionManager.getInstance().register(Product.class, undoManagerProvider); productManager.addListener(undoManagerProvider); productManager.addListener(new MultiSizeWarningListener()); selectionChangeSupports = new HashMap<>(); }
ProductManager restoreProducts(URI rootURI, ProgressMonitor pm, ProblemSolver problemSolver, List<Exception> problems) throws CanceledException { ProductManager productManager = new ProductManager(); try { pm.beginTask("Restoring products", productRefs.length);
@BeforeClass public static void setupClass() { final Product product = createTestProduct("P", "T"); addVirtualBand(product, "V", ProductData.TYPE_INT32, "42"); productManager = new ProductManager(); productManager.addProduct(product); }
@Before public void setup() { Product product = new Product("P", "T", 10, 10); product.setFileLocation(new File(String.format("out/%s.dim", product.getName()))); band = new VirtualBand("V", ProductData.TYPE_INT32, 10, 10, "42"); product.addBand(band); productManager = new ProductManager(); productManager.addProduct(product); }
ProductManager productManager = new ProductManager(); for (Product product : products) { productManager.addProduct(product);
@Test public void testDefaultTree() throws Exception { ProductManager productManager = new ProductManager();