Package at.bestsolution.efxclipse.tooling.fxgraph.fXGraph

Examples of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.ComponentDefinition


 
 
  @Override
  protected void _createChildren(IOutlineNode parentNode, EObject modelElement) {
    if( modelElement instanceof ComponentDefinition ) {
      ComponentDefinition def = (ComponentDefinition) modelElement;
      if( ! def.getDefines().isEmpty() ) {
        createEStructuralFeatureNode(parentNode, def, FXGraphPackage.Literals.COMPONENT_DEFINITION__DEFINES, IconKeys.getIcon(IconKeys.DEFINES_KEY), "Defines", false);
      }
     
      if( ! def.getScripts().isEmpty() ) {
        createEStructuralFeatureNode(parentNode, def, FXGraphPackage.Literals.COMPONENT_DEFINITION__SCRIPTS, IconKeys.getIcon(IconKeys.SCRIPTS_KEY), "Scripts", false);
      }
     
      if( def.getRootNode() != null ) {
        createNode(parentNode, def.getRootNode());
      }
     
      return;
    } else if( modelElement instanceof Element ) {
      for( EObject o : modelElement.eContents() ) {
View Full Code Here


        ControllerHandledValueProperty cp = (ControllerHandledValueProperty) object;
       
        Model m = (Model) object.eResource().getContents().get(0);
       
        if( m != null ) {
          ComponentDefinition def = m.getComponentDef();
          if( def != null ) {
            if( def.getController() != null && def.getController().getType() != null) {
              IType t = getJDTType(def.getController().getType());
              if( t != null ) {
                IFXCtrlClass fxClass = FXPlugin.getClassmodel().findCtrlClass(t.getJavaProject(), t);
                if( fxClass != null ) {
                  IFXCtrlEventMethod fxp = fxClass.getAllEventMethods().get(cp.getMethodname());
                  if( fxp != null ) {
View Full Code Here

          Region region = new Region(currentNode.getOffset(), currentNode.getLength());
         
          Model m = (Model) eo.eResource().getContents().get(0);
         
          if( m != null ) {
            ComponentDefinition def = m.getComponentDef();
            if( def != null ) {
              if( def.getController() != null && def.getController().getType() != null) {
                IType t = getJDTType(def.getController().getType());
                if( t != null ) {
                  IFXCtrlClass fxClass = FXPlugin.getClassmodel().findCtrlClass(t.getJavaProject(), t);
                  if( fxClass != null ) {
                    IFXCtrlEventMethod fxp = fxClass.getAllEventMethods().get(currentNode.getText());
                    if( fxp != null ) {
View Full Code Here

    return editor.getDocument().readOnly(new IUnitOfWork<String, XtextResource>() {

      @Override
      public String exec(XtextResource resource) throws Exception {
        if( ! resource.getContents().isEmpty() && ((Model)resource.getContents().get(0)).getComponentDef() != null ) {
          ComponentDefinition def = ((Model)resource.getContents().get(0)).getComponentDef();
          if( def.getSceneDefinition() != null ) {
            FXGraphGenerator generator = new FXGraphGenerator();
            return generator.doGeneratePreview(def.getSceneDefinition().eResource(), false, false);
          }
        }
       
        return null;
      }
View Full Code Here

          return;
        }
      }
      // we could create an import statement if there is no conflict
      Model file = (Model) context.getContents().get(0);
      ComponentDefinition clazz = file.getComponentDef();
     
      QualifiedName qualifiedName = qualifiedNameConverter.toQualifiedName(typeName);     
      if (qualifiedName.getSegmentCount() == 1) {
        // type resides in default package - no need to hassle with imports
        proposal.setCursorPosition(proposalReplacementString.length());
View Full Code Here

        EList<EObject> contents = resource.getContents();
        if (!contents.isEmpty()) {
          URI uri = resource.getURI();
          EObject rootObject = contents.get(0);
          if (rootObject instanceof Model) {
            ComponentDefinition def = ((Model) rootObject).getComponentDef();
            cssFiles = new ArrayList<String>(def.getPreviewCssFiles().size());
            for (String cssFile : def.getPreviewCssFiles()) {
              File absFile = RelativeFileLocator.locateFile(uri, cssFile);

              if (absFile != null) {
                try {
                  cssFiles.add(absFile.toURI().toURL().toExternalForm());
View Full Code Here

        EList<EObject> contents = resource.getContents();
        if (!contents.isEmpty()) {
          URI uri = resource.getURI();
          EObject rootObject = contents.get(0);
          if (rootObject instanceof Model) {
            ComponentDefinition def = ((Model) rootObject).getComponentDef();
           
            if (def != null && def.getPreviewResourceBundle() != null) {
              File f = RelativeFileLocator.locateFile(uri, def.getPreviewResourceBundle());
              if (f != null && f.exists()) {
                return f.getAbsolutePath();
              }
            }
          }
View Full Code Here

          URI uri = resource.getURI();
          IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.segment(1));
          IJavaProject jp = JavaCore.create(p);
          EObject rootObject = contents.get(0);
          if (rootObject instanceof Model) {
            ComponentDefinition def = ((Model) rootObject).getComponentDef();
           
            for (String path : def.getPreviewClasspathEntries()) {
              try {
                URI cpUri = URI.createURI(path);
                if (cpUri.isPlatformResource()) {
                  if (cpUri.lastSegment().equals("*")) {
                    cpUri = cpUri.trimSegments(1);
View Full Code Here

 
  @Override
  public QualifiedName getFullyQualifiedName(EObject obj) {
    if( obj instanceof ComponentDefinition ) {
      if( obj.eContainer() instanceof Model ) {
        ComponentDefinition compDef = (ComponentDefinition) obj;
        Model model = (Model) obj.eContainer();
        PackageDeclaration packageDec = model.getPackage();
        if( packageDec != null ) {
          return qualifiedNameConverter.toQualifiedName(packageDec.getName()+"."+compDef.getName());
        } else {
          return qualifiedNameConverter.toQualifiedName(compDef.getName());
        }
      }
     
    }
    // TODO Auto-generated method stub
View Full Code Here

          }
        }
        {
          EList<EObject> _contents_1 = resource.getContents();
          EObject _get_1 = _contents_1.get(0);
          ComponentDefinition _componentDef = ((Model) _get_1).getComponentDef();
          String _previewResourceBundle = _componentDef.getPreviewResourceBundle();
          boolean _notEquals = (!Objects.equal(_previewResourceBundle, null));
          if (_notEquals) {
            _builder.append("<?scenebuilder-preview-i18n-resource ");
            EList<EObject> _contents_2 = resource.getContents();
            EObject _get_2 = _contents_2.get(0);
            ComponentDefinition _componentDef_1 = ((Model) _get_2).getComponentDef();
            String _previewResourceBundle_1 = _componentDef_1.getPreviewResourceBundle();
            _builder.append(_previewResourceBundle_1, "");
            _builder.append("?>");
            _builder.newLineIfNotEmpty();
          }
        }
        {
          EList<EObject> _contents_3 = resource.getContents();
          EObject _get_3 = _contents_3.get(0);
          ComponentDefinition _componentDef_2 = ((Model) _get_3).getComponentDef();
          EList<String> _previewCssFiles = _componentDef_2.getPreviewCssFiles();
          for(final String css : _previewCssFiles) {
            _builder.append("<?scenebuilder-stylesheet ");
            _builder.append(css, "");
            _builder.append("?>");
            _builder.newLineIfNotEmpty();
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.ComponentDefinition

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.