Package org.objectstyle.wolips.core.resources.types.project

Examples of org.objectstyle.wolips.core.resources.types.project.ProjectAdapter


    }
    IProject iProject = ResourcesPlugin.getWorkspace().getRoot().getProject(argument);
    if (iProject == null || !iProject.exists() || !iProject.isAccessible()) {
      throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, "Could not find or open project: " + argument, null)); //$NON-NLS-1$
    }
    ProjectAdapter project = (ProjectAdapter) iProject.getAdapter(ProjectAdapter.class);
    IPath workingDir = null;
    if (project != null) {
      workingDir = project.getWorkingDir();
    }
    if (workingDir == null) {
      throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, "Could not find working dir for project: " + argument, null)); //$NON-NLS-1$
    }
    return workingDir.toString();
View Full Code Here


  public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException {
    if (project == null || entry == null) {
      // cannot resolve without entry or project context
      return new IRuntimeClasspathEntry[0];
    }
    ProjectAdapter projectAdapter = (ProjectAdapter)project.getProject().getAdapter(ProjectAdapter.class);
    IClasspathEntry cp = entry.getClasspathEntry();
    if (projectAdapter != null && projectAdapter.isFramework()) {
      if (cp != null && !cp.isExported() && cp.getPath() != null && cp.getPath().segmentCount() > 0 && WOFrameworkClasspathContainer.ID.equals(cp.getPath().segment(0))) {
        return new IRuntimeClasspathEntry[0];
      }
    }
    IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
View Full Code Here

   */
  public File verifyWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
    IProject theProject = this.getJavaProject(configuration).getProject();

    // IPath wd = getWorkingDirectoryPath(configuration);
    ProjectAdapter projectAdaptor = (ProjectAdapter) theProject.getAdapter(ProjectAdapter.class);

    IContainer workingDirectoryFolder = projectAdaptor.getWorkingDirFolder();
    File workingDirectoryFile;
    if (workingDirectoryFolder == null) {
      workingDirectoryFile = super.verifyWorkingDirectory(configuration);
    } else {
      workingDirectoryFile = workingDirectoryFolder.getLocation().toFile();
View Full Code Here

      visitedProjects.add(project);
      if (project.equals(buildProject)) {
        searchPathBuffer.append("\"..\",\"../..\"");
      }
      if (isValidProjectPath(project)) {
        ProjectAdapter projectAdapter = (ProjectAdapter) project.getAdapter(ProjectAdapter.class);
        if (projectAdapter != null && projectAdapter.isFramework()) {
          searchPathBuffer.append(",\"");
          searchPathBuffer.append(project.getLocation().toOSString());
          searchPathBuffer.append("\"");
        }
      } else {
View Full Code Here

          _currentSelection = parentJavaElement;
          setContainerFullPath(componentPathForPackage((IPackageFragment)_currentSelection));
        }
        else {
          IFolder selectedFolder = (IFolder)selectedObject;
          ProjectAdapter projectAdapter = (ProjectAdapter) selectedFolder.getProject().getAdapter(ProjectAdapter.class);
          IPath rootFolder = selectedFolder.getProjectRelativePath().uptoSegment(1);
          if (!rootFolder.equals(projectAdapter.getDefaultComponentsFolder().getProjectRelativePath())) {
            setContainerFullPath(projectAdapter.getDefaultComponentsFolder().getFullPath());
          }
        }
      }
      else if (selectedObject instanceof IResource) {
        IResource selectedResource = (IResource) selectedObject;
        ProjectAdapter projectAdapter = (ProjectAdapter) selectedResource.getProject().getAdapter(ProjectAdapter.class);
        setContainerFullPath(projectAdapter.getDefaultComponentsFolder().getFullPath());
      }
    }
  }
View Full Code Here

   */
  public void createControl(Composite parent) {
    // inherit default container and name specification widgets
    super.createControl(parent);
   
    ProjectAdapter projectAdapter = (ProjectAdapter) getProject().getAdapter(ProjectAdapter.class);
    if (projectAdapter != null) {
      IContainer resource = (IContainer)ResourcesPlugin.getWorkspace().getRoot().findMember(getContainerFullPath());
      if (!projectAdapter.isResourceContainer(resource)) {
        setContainerFullPath(projectAdapter.getDefaultResourcesFolder().getFullPath());
      }
    }

    Composite composite = (Composite) getControl();
    // WorkbenchHelp.setHelp(composite,
View Full Code Here

    }
    return change;
  }

  public static ProjectAdapter getInitializedProject(Object _element) {
    ProjectAdapter initializedProject = null;
    try {
      if (_element instanceof IType) {
        IType sourceType = (IType) _element;
        ProjectAdapter project = (ProjectAdapter) sourceType.getJavaProject().getProject().getAdapter(ProjectAdapter.class);
        String principalClass = project.getBuildProperties().getPrincipalClass(true);
        String fullyQualifiedName = sourceType.getFullyQualifiedName();
        if (principalClass != null && principalClass.equals(fullyQualifiedName)) {
          initializedProject = project;
        }
      } else if (_element instanceof IPackageFragment) {
        IPackageFragment packageFragment = (IPackageFragment) _element;
        ProjectAdapter project = (ProjectAdapter) packageFragment.getJavaProject().getProject().getAdapter(ProjectAdapter.class);
        String principalClass = project.getBuildProperties().getPrincipalClass(true);
        if (principalClass != null) {
          int dotIndex = principalClass.lastIndexOf('.');
          if (dotIndex != -1) {
            String principalClassPackage = principalClass.substring(0, dotIndex);
            String packageName = packageFragment.getElementName();
View Full Code Here

            WOLipsNatureUtils.setNatureForProject(WOLipsNatureUtils.INCREMENTAL_APPLICATION_ID, useTargetBuilder, getProject(), new NullProgressMonitor());
          } else if (_buildStyleAntButton.getSelection()) {
            WOLipsNatureUtils.setNatureForProject(WOLipsNatureUtils.ANT_APPLICATION_ID, useTargetBuilder, getProject(), new NullProgressMonitor());
          }
        }
        ProjectAdapter project = getProjectAdapter();
        if (project != null) {
          BuildProperties buildProperties = getBuildProperties();
          buildProperties.setPrincipalClass(_principalClassText.getText());
          buildProperties.setEOAdaptorClassName(_eoAdaptorClassText.getText());
          String projectFrameworkFolderText = _projectFrameworkFolderText.getText();
View Full Code Here

* @author ulrich
*/
public class InstallAction extends AbstractInstallAction {

  public void run(IAction action) {
    ProjectAdapter project = (ProjectAdapter) this.getIProject().getAdapter(ProjectAdapter.class);
    if (project != null && this.getIProject().getFile("build.xml").exists()) {
      this.install(new IProject[] { this.getIProject() });
    }
  }
View Full Code Here

  }

  public boolean performOk() {
    // store the value in the owner text field
    try {
      ProjectAdapter projectAdapter = getProjectAdapter();
      if (projectAdapter != null) {
        BuildProperties buildProperties = getBuildProperties();
        buildProperties.setCustomInfoPListContent(_customInfoPListText.getText());
        buildProperties.setServletDeployment(_servletDeploymentCheck.getSelection());
        buildProperties.setWebXML(_generateWebXMLCheck.getSelection());
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.core.resources.types.project.ProjectAdapter

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.