Package org.objectstyle.wolips.jdt

Examples of org.objectstyle.wolips.jdt.ProjectFrameworkAdapter


    databaseConfig.setAdaptorName(_adaptorName);
    model.addDatabaseConfig(databaseConfig);
    modelGroup.addModel(model);
    modelGroup.setEditingModelName(_modelName);

    ProjectFrameworkAdapter frameworkAdapter = (ProjectFrameworkAdapter)_parentResource.getProject().getAdapter(ProjectFrameworkAdapter.class);
    // 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();
        if (activeConfig != null) {
View Full Code Here


    Group modelConfigurationGroup = new Group(composite, SWT.NONE);
    modelConfigurationGroup.setLayout(new GridLayout(2, false));
    modelConfigurationGroup.setText("Options");
    modelConfigurationGroup.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));

    ProjectFrameworkAdapter projectFrameworkAdapter = (ProjectFrameworkAdapter) getProject().getAdapter(ProjectFrameworkAdapter.class);

    Label adaptorLabel = new Label(modelConfigurationGroup, SWT.NONE);
    adaptorLabel.setText("Adaptor:");
   
    _adaptorCombo = new Combo(modelConfigurationGroup, SWT.READ_ONLY);
    _adaptorCombo.add("None");
    int selectedIndex = 0;
    int index = 0;
    for (String pluginName : projectFrameworkAdapter.getAdaptorFrameworks().keySet()) {
      _adaptorCombo.add(pluginName);
      if ("JDBC".equals(pluginName)) {
        selectedIndex = index;
      }
      index ++;
    }
    _adaptorCombo.select(selectedIndex + 1);

    Label pluginLabel = new Label(modelConfigurationGroup, SWT.NONE);
    pluginLabel.setText("PlugIn:");
    _pluginCombo = new Combo(modelConfigurationGroup, SWT.READ_ONLY);
    _pluginCombo.add("None");
    for (String pluginName : projectFrameworkAdapter.getPluginFrameworks().keySet()) {
      _pluginCombo.add(pluginName);
    }
    _pluginCombo.select(0);

    _createEOGeneratorFileButton = new Button(modelConfigurationGroup, SWT.CHECK);
View Full Code Here

    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    for (int i = 0; i < projects.length; i++) {
      IProject iProject = projects[i];
      if (iProject.isAccessible() && iProject.isOpen()) {
        if (iProject.getFile("build.xml").exists()) {
          ProjectFrameworkAdapter project = (ProjectFrameworkAdapter) this.getIProject().getAdapter(ProjectFrameworkAdapter.class);
          if (project != null) {
            if (iProject == this.getIProject()) {
              arrayList.add(iProject);
            } else {
              if (project.isFrameworkReference(iProject)) {
                arrayList.add(iProject);
              }
            }
          }
        }
View Full Code Here

        IResource resource = resourceDelta.getResource();
        if (resource instanceof IProject) {
          if ((resourceDelta.getFlags() & IResourceDelta.OPEN) != 0) {
            final IProject project = (IProject) resource;
            if (project.isOpen()) {
              final ProjectFrameworkAdapter projectFrameworkAdapter = (ProjectFrameworkAdapter) project.getAdapter(ProjectFrameworkAdapter.class);
              if (projectFrameworkAdapter != null) {
                new WorkspaceJob("Initialize WOLips Project") {
                 
                  @Override
                  public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
                    projectFrameworkAdapter.initializeProject();
                    return Status.OK_STATUS;
                  }
                }.schedule();
              }
            }
View Full Code Here

        buildProperties.setCustomInfoPListContent(_customInfoPListText.getText());
        buildProperties.setServletDeployment(_servletDeploymentCheck.getSelection());
        buildProperties.setWebXML(_generateWebXMLCheck.getSelection());
        buildProperties.setWebXML_CustomContent(_customWebXMLText.getText());

        ProjectFrameworkAdapter projectFrameworkAdapter = getProjectFrameworkAdapter();
        if (buildProperties.isServletDeployment()) {
          projectFrameworkAdapter.addFrameworkNamed("JavaWOJSPServlet");
        } else {
          projectFrameworkAdapter.removeFrameworkNamed("JavaWOJSPServlet");
        }

        for (Root root : _embedButtons.keySet()) {
          Button embedButton = _embedButtons.get(root);
          boolean embed = buildProperties.isServletDeployment() || (embedButton.isEnabled() && embedButton.getSelection());
View Full Code Here

  public void handleClasspath(IResource resource, IProgressMonitor progressMonitor, Map buildCache) {

    IPBDotProjectOwner pbDotProjectOwner = this.getIPBDotProjectOwner(resource);
    IPBDotProjectAdapter pbDotProjectAdapter = this.getIPBDotProjectAdapter(pbDotProjectOwner);
    IProject project = resource.getProject();
    ProjectFrameworkAdapter projectAdapter = (ProjectFrameworkAdapter) project.getAdapter(ProjectFrameworkAdapter.class);
    try {
      Set<String> frameworkNames = projectAdapter.getLinkedFrameworkNames();
      pbDotProjectAdapter.updateFrameworkNames(new LinkedList<String>(frameworkNames));
    } catch (JavaModelException e) {
      throw new RuntimeException("Unable to retrieve a list of frameworks.", e);
    }
  }
View Full Code Here

      Map<String, IEclipseFramework> namedFrameworksMap = new HashMap<String, IEclipseFramework>();
      for (IEclipseFramework framework : _frameworks) {
        namedFrameworksMap.put(framework.getName(), framework);
      }

      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);
        }
View Full Code Here

    }
    return false;
  }

  protected void writeXcodeProject(IProgressMonitor monitor, IProject project, PBXProject xcodeProject, String projectFolderName) throws CoreException, PropertyListParserException, IOException {
    ProjectFrameworkAdapter projectAdapter = (ProjectFrameworkAdapter) project.getAdapter(ProjectFrameworkAdapter.class);
    List frameworkPaths = projectAdapter.getFrameworkPaths();
    //System.out.println("DotXcodeBuilder.writeXcodeProject: Writing " + project.getName() + " " + xcodeProject);
    Iterator frameworkPathsIter = frameworkPaths.iterator();
    while (frameworkPathsIter.hasNext()) {
      IPath frameworkPath = (IPath) frameworkPathsIter.next();
      IContainer frameworkContainer = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(frameworkPath);
View Full Code Here

      }
    }
    else if ("Frameworks".equals(defaultsName)) {
      if (partialValue != null && partialValue.startsWith("\"")) {
        validValues.add("\"app\"");
        ProjectFrameworkAdapter projectFrameworkAdapter = (ProjectFrameworkAdapter) javaProject.getProject().getAdapter(ProjectFrameworkAdapter.class);
        if (projectFrameworkAdapter != null) {
          for (String frameworkName : projectFrameworkAdapter.getLinkedFrameworkNames()) {
            validValues.add("\"" + frameworkName + "\"");
          }
        }
      }
    }
View Full Code Here

    return projectAdapter;
  }

  public ProjectFrameworkAdapter getProjectFrameworkAdapter() {
    IProject project = getProject();
    ProjectFrameworkAdapter projectFrameworkAdapter = null;
    if (project != null) {
      projectFrameworkAdapter = (ProjectFrameworkAdapter) project.getAdapter(ProjectFrameworkAdapter.class);
    }
    return projectFrameworkAdapter;
  }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.jdt.ProjectFrameworkAdapter

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.