Package org.eclipse.pde.core.target

Examples of org.eclipse.pde.core.target.ITargetDefinition


  private boolean trySetTargetPlatform(URI targetFileURIToSet, SubMonitor subMonitor, WorkspaceFileTargetHandle fileHandle) throws CoreException {
    File targetFile = ((WorkspaceFileTargetHandle) fileHandle).getTargetFile().getLocation().toFile();
    URI targetFileURI = URI.createFileURI(targetFile.getAbsolutePath());
    if (targetFileURI.equals(targetFileURIToSet)) {
      ITargetDefinition targetDefinitionToSet = fileHandle.getTargetDefinition();

      if (!targetDefinitionToSet.isResolved()) {
        targetDefinitionToSet.resolve(subMonitor.newChild(80));
      }
      subMonitor.setWorkRemaining(0);
     
      IStatus compare = service.get().compareWithTargetPlatform(targetDefinitionToSet);
      if (compare != null && !compare.isOK()) {
View Full Code Here


    return false;
  }

  public Optional<URI> getActiveTargetPlatformFileURI() throws CoreException {
    if (service.isPresent()) {
      ITargetDefinition currentlySelected = service.get().getWorkspaceTargetHandle().getTargetDefinition();
      if (currentlySelected.getHandle() instanceof WorkspaceFileTargetHandle) {
        IFile targetFile = ((WorkspaceFileTargetHandle) currentlySelected.getHandle()).getTargetFile();
        URI targetFileURI = URI.createFileURI(targetFile.getLocation().toFile().getAbsolutePath());
        return Optional.of(targetFileURI);
      }
    }
    return Optional.absent();
View Full Code Here

TOP

Related Classes of org.eclipse.pde.core.target.ITargetDefinition

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.