Package org.objectstyle.wolips.jdt.classpath.model

Examples of org.objectstyle.wolips.jdt.classpath.model.IEclipseFramework


    // add adaptor framework
    if (!"None".equals(_adaptorName) && !"".equals(_adaptorName)) {
      frameworkAdapter.addFrameworks(frameworkAdapter.getAdaptorFrameworks().get(_adaptorName));
    }
    if (!"None".equals(_pluginName) && !"".equals(_pluginName)) {
      IEclipseFramework pluginFramework = frameworkAdapter.getPluginFrameworks().get(_pluginName);
      frameworkAdapter.addFrameworks(pluginFramework);
      String selectedPrototypeEntityName = "EO" + _adaptorName + _pluginName + "Prototypes";
      EOEntity selectedPrototypeEntity = modelGroup.getEntityNamed(selectedPrototypeEntityName);
      if (selectedPrototypeEntity != null) {
        EODatabaseConfig activeConfig = model.getActiveDatabaseConfig();
View Full Code Here


 
  protected WOFrameworkClasspathContainer classpathContainerForPath(IPath containerPath, IJavaProject javaProject) {
    String frameworkName = frameworkNameForClasspathPath(containerPath);
    boolean hasProjectConfig = VariablesPlugin.getDefault().hasProjectVariables(javaProject.getProject());
    EclipseFrameworkModel frameworkModel = JdtPlugin.getDefault().getFrameworkModel(hasProjectConfig ? javaProject.getProject() : null);
    IEclipseFramework framework = frameworkModel.getFrameworkWithName(frameworkName);
    return classpathContainerForFramework(framework, containerPath);
  }
View Full Code Here

    return _project;
  }
 
  public IEclipseFramework getFramework() {
    FrameworkModel<IEclipseFramework> frameworkModel = JdtPlugin.getDefault().getFrameworkModel(_project);
    IEclipseFramework framework = frameworkModel.getApplicationWithName(_project.getName());
    if (framework == null) {
      framework = frameworkModel.getFrameworkWithName(_project.getName());
    }
    return framework;
  }
View Full Code Here

  public void addFrameworksNamed(String... frameworkNames) throws JavaModelException {
    IProject project = getProject();
    FrameworkModel<IEclipseFramework> frameworkModel = JdtPlugin.getDefault().getFrameworkModel(project);
    List<IEclipseFramework> frameworks = new LinkedList<IEclipseFramework>();
    for (String frameworkName : frameworkNames) {
      IEclipseFramework framework = frameworkModel.getFrameworkWithName(frameworkName);
      if (framework == null) {
        throw new NoSuchElementException("There is no framework named '" + frameworkName + "'.");
      }
      frameworks.add(framework);
    }
View Full Code Here

    IJavaProject javaProject = JavaCore.create(project);

    FrameworkModel<IEclipseFramework> frameworkModel = JdtPlugin.getDefault().getFrameworkModel(project);
    List<IEclipseFramework> frameworks = new LinkedList<IEclipseFramework>();
    for (String frameworkName : frameworkNames) {
      IEclipseFramework framework = frameworkModel.getFrameworkWithName(frameworkName);
      if (framework == null) {
        throw new NoSuchElementException("There is no framework named '" + frameworkName + "'.");
      }
      frameworks.add(framework);
    }
View Full Code Here

      if (linkedFramework.getName().equals(frameworkName)) {
        return linkedFramework;
      }
    }
    FrameworkModel<IEclipseFramework> frameworkModel = JdtPlugin.getDefault().getFrameworkModel(getProject());
    IEclipseFramework framework = frameworkModel.getFrameworkWithName(frameworkName);
    return framework;
  }
View Full Code Here

    }

    try {
      ProjectFrameworkAdapter projectFrameworkAdaptor = (ProjectFrameworkAdapter) project.getAdapter(ProjectFrameworkAdapter.class);
      if (projectFrameworkAdaptor != null) {
        IEclipseFramework foundationFramework;
        // ... If you have the JavaFoundation source framework and you're actually talking to it right now, well .. we have
        // to special case that one. If a JavaFoundation framework falls in the forest, does it make a sound?
        if ("JavaFoundation".equals(project.getName())) {
          foundationFramework = JdtPlugin.getDefault().getFrameworkModel(project).getFrameworkWithName("JavaFoundation");
        }
        else {
          foundationFramework = projectFrameworkAdaptor.getLinkedFrameworkNamed("JavaFoundation");
        }
        if (foundationFramework != null) {
          Version version = foundationFramework.getVersion();
          if (version != null && !version.isUndefined()) {
            buildProperties.setWOVersionDefault(version);
          }
        }
       
        boolean wellFormedTemplateRequiredDefault;
        if (projectFrameworkAdaptor.isLinkedToFrameworkNamed("WOOgnl")) {
          buildProperties.setInlineBindingPrefixDefault("$");
          buildProperties.setInlineBindingSuffixDefault("");
          wellFormedTemplateRequiredDefault = false;
        } else if (buildProperties.getWOVersion().isAtLeastVersion(5, 4)) {
          buildProperties.setInlineBindingPrefixDefault("[");
          buildProperties.setInlineBindingSuffixDefault("]");
          wellFormedTemplateRequiredDefault = true;
        } else {
          buildProperties.setInlineBindingPrefixDefault("[");
          buildProperties.setInlineBindingSuffixDefault("]");
          wellFormedTemplateRequiredDefault = false;
        }
        String globalWellFormedTemplateRequiredDefault = Platform.getPreferencesService().getString("org.objectstyle.wolips.bindings", "WellFormedTemplate", null, null);
        if ("yes".equals(globalWellFormedTemplateRequiredDefault)) {
          wellFormedTemplateRequiredDefault = true;
        }
        else if ("no".equals(globalWellFormedTemplateRequiredDefault)) {
          wellFormedTemplateRequiredDefault = false;
        }
        buildProperties.setWellFormedTemplateRequiredDefault(VariablesPlugin.getDefault().getGlobalVariables().getBoolean("component.wellFormedTemplateRequired", wellFormedTemplateRequiredDefault));
       
        IEclipseFramework framework = projectFrameworkAdaptor.getFramework();
        if (framework != null) {
          buildProperties.setVersionDefault(framework.getVersion());
        }
      }
    } catch (Throwable e) {
      e.printStackTrace(System.out);
    }
View Full Code Here

    // _frameworkTableViewer.addSelectionChangedListener(this);

    final CheckboxTableViewer finalFrameworkTableViewer = _frameworkTableViewer;
    _frameworkTableViewer.addCheckStateListener(new ICheckStateListener() {
      public void checkStateChanged(CheckStateChangedEvent event) {
        IEclipseFramework checkedFramework = (IEclipseFramework) event.getElement();
        if (!event.getChecked() && isFrameworkUsed(checkedFramework)) {
          finalFrameworkTableViewer.setChecked(checkedFramework, true);
        }
      }
    });
View Full Code Here

      }

      ProjectFrameworkAdapter frameworkAdapter = (ProjectFrameworkAdapter)_project.getProject().getAdapter(ProjectFrameworkAdapter.class);
      Set<String> linkedFrameworkNames = frameworkAdapter.getLinkedFrameworkNames();
      for (String linkedFrameworkName : linkedFrameworkNames) {
        IEclipseFramework localFramework = namedFrameworksMap.get(linkedFrameworkName);
        if (localFramework != null) {
          _usedFrameworks.add(localFramework);
        }
      }
    } catch (Throwable t) {
View Full Code Here

  public IClasspathEntry[] getNewContainers() {
    Set<IClasspathEntry> classpathEntries = new HashSet<IClasspathEntry>();
    if (_frameworkTableViewer != null) {
      Object[] checkedObjects = _frameworkTableViewer.getCheckedElements();
      for (Object checkedObject : checkedObjects) {
        IEclipseFramework selectedFramework = (IEclipseFramework) checkedObject;
        if (!isFrameworkUsed(selectedFramework)) {
          WOFrameworkClasspathContainer frameworkContainer = new WOFrameworkClasspathContainer(selectedFramework);
          classpathEntries.add(JavaCore.newContainerEntry(frameworkContainer.getPath()));
        }
      }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.jdt.classpath.model.IEclipseFramework

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.