Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path


  public Object[] getElements(Object inputElement) {
      final List<IFile> fileList = new ArrayList<IFile>();
    if (inputElement instanceof File) {
      File root = (File) inputElement;   
      IContainer rootContainer = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(new Path(root.getAbsolutePath()));
     
      try {
                rootContainer.accept(new IResourceVisitor() {
                   
                    public boolean visit(IResource resource) throws CoreException {
View Full Code Here


        return super.isFeatureSupported(featureID);
    }

    public IFile getSchemaDefinitionFile() {
        if (_designContainer != null) {
            return _designContainer.getFolder(new Path("files").append("system")).getFile("schema.xml");
        } else {
            return null;
        }
  }
View Full Code Here

    if (selectedResource instanceof IContainer) {
      IContainer selectedFolder = (IContainer) selectedResource;
      while (!(selectedFolder instanceof IProject) && selectedFolder != null) {

        if (WGADesignStructureHelper.isDesignFolder(selectedFolder)) {
          return new SingleStructuredSelection(selectedFolder.getFolder(new Path(getPathNameUnderDesign())));
        }       

        if (getFilter().select(selectedFolder)) {
          return new SingleStructuredSelection(selectedFolder);
        }
View Full Code Here

  @Override
  public void reload() throws IOException {
    setDefaults();
   
    // retrieve metadata folder
    _metadataFolder = _tmlFile.getParent().getFolder(new Path("metadata"));
    if (_metadataFolder.exists()) {
      _metadataFile = _metadataFolder.getFile(_tmlFile.getName().substring(0, _tmlFile.getName().length() - _tmlFile.getFileExtension().length()) + "metadata.xml");
      if (_metadataFile.exists()) {
        XStream xstream = new XStream(new DomDriver());
        xstream.alias(TMLMetadataInfo.XSTREAM_ALIAS, TMLMetadataInfo.class);
View Full Code Here

  @Override
  public void createPartControl(Composite parent) {
    _browser = new Browser(parent, SWT.NONE);
    Bundle plugin = WGADesignerPlugin.getDefault().getBundle();
    IPath relativePagePath = new Path("resources/html/gettingStarted/step1.1.html");
    URL fileInPlugin = FileLocator.find(plugin, relativePagePath, null);
    if (fileInPlugin != null) {
      try {
        URL pageUrl = FileLocator.toFileURL(fileInPlugin);
        _browser.setUrl(pageUrl.toString());
View Full Code Here

        monitor.setTaskName("retrieving remote resouce states");
        List<FSDesignResourceState> remoteStates = _server.getServices().retrieveFSDesignResourceState(_server.getSession(), computeRelativPathFromDesignRoot(start).toString());
       
        // map states by path rooted to wga designroot
        for (LocalFSDesignResourceState state : localStates) {
          IPath path = new Path(state.getPath());
          _localStates.put(path.makeRelative(), state);
        }       
        for (FSDesignResourceState state : remoteStates) {
          IPath path = new Path(state.getPath());
          _remoteStates.put(path.makeRelative(), state);   
        }
       
        // perform steps for plugin sync if runtime is started
        if (TomcatUtils.getInstance().isRunning(_runtime)) {
            monitor.beginTask("connecting to local WGA server", IProgressMonitor.UNKNOWN);
View Full Code Here

    LocalFSDesignResourceState state = new LocalFSDesignResourceState();
    states.add(state);
    state.setDirLinkName(linkName);
    state.setDirLinkTarget(linkTarget);
    state.setFqPath(resource.getFullPath());   
    state.setPath(new Path(linkName).append(computeRelativPathFrom(resource, linkTarget.getFullPath()).makeRelative()).toString());   
    if (resource instanceof IContainer) {
      state.setType(FSDesignResourceState.TYPE_FOLDER);
      IContainer container = (IContainer) resource;
      for (IResource child : container.members()) {
        List<LocalFSDesignResourceState> childStates = buildDirLinkFSDesignResourceStates(linkTarget, linkName, child);
View Full Code Here

      // compute design folder name
      String[] pathElements = state.getPath().split("/");
      if (pathElements != null && pathElements.length > 0) {
        String designFolderName = pathElements[0];
        // check if this design is internal or external
        IFolder designFolder = _runtime.getDesignRoot().getFolder(new Path(designFolderName));
        if (WGADesignStructureHelper.isDirlinkFolder(designFolder)) {
          // this is an external design
          IContainer linkTarget = WGADesignStructureHelper.resolveDirLink(designFolder.getFile(WGUtils.DIRLINK_FILE));
          path = linkTarget.getFullPath().append(new Path(state.getPath()).removeFirstSegments(1));
        } else {
          path = _runtime.getDesignRoot().getFullPath().append(new Path(state.getPath()));   
        }
      } else {
        path = _runtime.getDesignRoot().getFullPath().append(new Path(state.getPath()));
      }     
    }
   
    IResource resource = null;
    if (state.getType() == FSDesignResourceState.TYPE_FOLDER) {
View Full Code Here

      IProject project = runtime.getProject();
      return project.getFolder("plugins");
  }
 
  public static IResource buildVirtualPluginResource(WGARuntime runtime, PluginInfo info) {
      return retrieveVirtualPluginRoot(runtime).getFile(new Path(info.getUniqueName() + "-" + info.getVersion() + ".wgaplugin"));
    }
View Full Code Here

            throw new ExecutionException("The runtime is not started.");
        }
       
        String param = event.getParameter(PARAM_TMLFilePath);
        if (param != null) {
            Path path = new Path(param);
            IFile tmlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
            String dbkey = OpenModulInBrowser.determineContentStoreOfFile(tmlFile);
            if (dbkey == null) {
                throw new ExecutionException("None of the web applications of the current runtime are connected to this design resource.");
            }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.Path

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.