@Override public void initComposer(ClassSourceFileComposerFactory composerFactory) { composerFactory.addImport(EntryPoint.class.getName()); composerFactory.addImport(SimpleErrorDisplayer.class.getName()); composerFactory.addImport(ErrorManager.class.getName()); composerFactory.addImport(ErrorDisplayer.class.getName()); composerFactory.addImplementedInterface(EntryPoint.class.getName()); }
@Override public void initComposer(ClassSourceFileComposerFactory composerFactory) { composerFactory.addImport(EntryPoint.class.getName()); composerFactory.addImport(Theme.class.getName()); composerFactory.addImport(ThemeController.class.getName()); composerFactory.addImport(CssLink.class.getName()); composerFactory.addImplementedInterface(EntryPoint.class.getName()); }
@Override public void initComposer(ClassSourceFileComposerFactory composerFactory) { composerFactory.addImport(EntryPoint.class.getName()); composerFactory.addImport(MvpController.class.getName()); composerFactory.addImport(ActivityFactory.class.getName()); composerFactory.addImport(EntryPoint.class.getName()); composerFactory.addImport(AcceptsOneWidget.class.getName()); composerFactory.addImport(IsWidget.class.getName()); composerFactory.addImport(RootPanel.class.getName()); composerFactory.addImplementedInterface(EntryPoint.class.getName()); }
public GwtcEntryPointBuilder(SourceBuilder<GwtcService> gwtc) { this.gwtc = gwtc.getPayload(); this.cls = gwtc.getClassBuffer(); out = cls.addInterface(EntryPoint.class) .createMethod("void onModuleLoad"); instanceProviders = new LinkedHashMap<>(); }
public void addClass(Class<?> clazz) { if (!finished.add(clazz.getName())) { return; } addGwtModules(clazz); if (EntryPoint.class.isAssignableFrom(clazz)) { try { addMethod(clazz.getMethod("onModuleLoad")); } catch (Exception e) { X_Log.error(GwtcProjectGenerator.class, "Could not extract onModuleLoad method from ", clazz, e); } } else if (GWTTestCase.class.isAssignableFrom(clazz)) { addGwtTestCase(clazz.asSubclass(GWTTestCase.class)); } else if (GWTTestSuite.class.isAssignableFrom(clazz)) { addGwtTestSuite(clazz.asSubclass(GWTTestSuite.class)); } else if (RunAsyncCallback.class.isAssignableFrom(clazz)) { addAsyncBlock(clazz.asSubclass(RunAsyncCallback.class)); } else { // Check if this class has methods annotated w/ junit @Test for (Method m : clazz.getMethods()) { if (m.getAnnotation(Test.class) != null) { finished.remove(clazz.getName()); addJUnitClass(clazz); return; } } try { addMethod(clazz.getMethod("main", String[].class)); } catch (Exception ignored){ X_Log.warn(getClass(), "Class",clazz," was added to Gwtc, " + "but that class was not a subclass of EntryPoint, RunAsync," + " GWTTestCase, GWTTestSuite, nor did it have a main method, or" + " any JUnit 4 annotated @Test method."); } } }
public CustomImageElementDropControler(Widget dropTarget, EntryPoint newEntrypoint) { super(dropTarget); widgetMap = new HashMap<Integer, String>(); }