Package org.dyno.visual.swing.plugin.spi

Examples of org.dyno.visual.swing.plugin.spi.ISourceParser


    ParserFactory factory = ParserFactory.getDefaultParserFactory();
    if (factory == null)
      throw new Exception("No parser factory available!");
    ICompilationUnit unit = JavaCore.createCompilationUnitFrom(file.getFile());
    hostProject = unit.getJavaProject();
    ISourceParser sourceParser = factory.newParser();
    isParsing = true;
    VisualSwingPlugin.setCurrentEditor(this);
    this.designer.setCompilationUnit(unit);
    try {
      WidgetAdapter adapter = sourceParser.parse(unit, monitor);
      if (adapter != null) {
        designer.initRootWidget(adapter);
        setUpLookAndFeel(adapter.getWidget().getClass());
        designer.initNamespaceWithUnit(unit);
        refreshTree();
View Full Code Here


        IFileEditorInput file = (IFileEditorInput) getEditorInput();
        setPartName(file.getName());
        setTitleToolTip(file.getToolTipText());
        ParserFactory factory = ParserFactory.getDefaultParserFactory();
        if (factory != null) {
          ISourceParser sourceParser = factory.newParser();
          Component root = designer.getRoot();
          if (root != null) {
            WidgetAdapter rootAdapter = WidgetAdapter.getWidgetAdapter(root);
            JavaUtil.hideMenu();
            String lnfCN = getLnfClassname();
            rootAdapter.setPreferredLookAndFeel(lnfCN); //$NON-NLS-1$
            ICompilationUnit unit = sourceParser.generate(rootAdapter, monitor);
            rootAdapter.setPreferredLookAndFeel(null); //$NON-NLS-1$
            if (unit != null) {
              designer.initNamespaceWithUnit(unit);
              designer.setLnfChanged(false);
            }
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.plugin.spi.ISourceParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.