Examples of LocalizedComponentsLocateResult


Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public void run(IAction action) {
    ComponentEditor componentEditor = this.getComponentEditor();
    if (componentEditor != null) {
      componentEditor.switchToWod();
    } else {
      LocalizedComponentsLocateResult localizedComponentsLocateResult = this.getLocalizedComponentsLocateResult();
      if (localizedComponentsLocateResult == null) {
        return;
      }
      try {
        if (localizedComponentsLocateResult.getFirstWodFile() == null) {
          return;
        }
        WorkbenchUtilities.open(localizedComponentsLocateResult.getFirstWodFile(), EditorsPlugin.WOBuilderID);
      } catch (CoreException e) {
        ComponenteditorPlugin.getDefault().log(e);
      }
    }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public void run(IAction action) {
    ComponentEditor componentEditor = this.getComponentEditor();
    if (componentEditor != null) {
      componentEditor.switchToWod();
    } else {
      LocalizedComponentsLocateResult localizedComponentsLocateResult = this.getLocalizedComponentsLocateResult();
      if (localizedComponentsLocateResult == null) {
        return;
      }
      try {
        if (localizedComponentsLocateResult.getFirstWodFile() == null) {
          return;
        }
        WorkbenchUtilities.open(localizedComponentsLocateResult.getFirstWodFile(), EditorsPlugin.ComponentEditorID);
      } catch (CoreException e) {
        ComponenteditorPlugin.getDefault().log(e);
      }
    }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public void run(IAction action) {
    ComponentEditor componentEditor = this.getComponentEditor();
    if (componentEditor != null) {
      componentEditor.switchToApi();
    } else {
      LocalizedComponentsLocateResult localizedComponentsLocateResult = this.getLocalizedComponentsLocateResult();
      if (localizedComponentsLocateResult == null) {
        return;
      }
      if (localizedComponentsLocateResult.getDotApi() == null) {
        return;
      }
      WorkbenchUtilities.open(localizedComponentsLocateResult.getDotApi(), EditorsPlugin.ComponentEditorID);
    }

  }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public LocalizedComponentsLocateResult getLocalizedComponentsLocateResult() {
    IEditorInput editorInput = this.editorPart.getEditorInput();
    FileEditorInput fileEditorInput = (FileEditorInput) editorInput;
    IFile file = fileEditorInput.getFile();
    LocalizedComponentsLocateResult localizedComponentsLocateResult = null;
    try {
      localizedComponentsLocateResult = LocatePlugin.getDefault().getLocalizedComponentsLocateResult(file);
    } catch (CoreException e) {
      ComponenteditorPlugin.getDefault().log(e);
      return null;
    } catch (LocateException e) {
      ComponenteditorPlugin.getDefault().log(e);
      return null;
    }
    if (localizedComponentsLocateResult.getComponents() == null || localizedComponentsLocateResult.getComponents().length == 0) {
      return null;
    }
    return localizedComponentsLocateResult;
  }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public void run(IAction action) {
    ComponentEditor componentEditor = this.getComponentEditor();
    if (componentEditor != null) {
      componentEditor.switchToHtml();
    } else {
      LocalizedComponentsLocateResult localizedComponentsLocateResult = this.getLocalizedComponentsLocateResult();
      if (localizedComponentsLocateResult == null) {
        return;
      }
      try {
        if (localizedComponentsLocateResult.getFirstHtmlFile() == null) {
          return;
        }
        WorkbenchUtilities.open(localizedComponentsLocateResult.getFirstHtmlFile(), EditorsPlugin.ComponentEditorID);
      } catch (CoreException e) {
        ComponenteditorPlugin.getDefault().log(e);
      }
    }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public SwitchToJavaEditorActionDelegate() {
    super();
  }

  public void run(IAction action) {
    LocalizedComponentsLocateResult localizedComponentsLocateResult = this.getLocalizedComponentsLocateResult();
    if (localizedComponentsLocateResult == null) {
      return;
    }
    if (localizedComponentsLocateResult.getDotJava() != null) {
      WorkbenchUtilities.open(localizedComponentsLocateResult.getDotJava());
    }
    if (localizedComponentsLocateResult.getDotGroovy() != null) {
      WorkbenchUtilities.open(localizedComponentsLocateResult.getDotGroovy());
    }
   
  }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  public static void openComponentWithTypeNamed(IJavaProject javaProject, String typeName) {
    try {
      IType type = javaProject.findType(typeName);
      if (type != null) {
        JavaUI.openInEditor(type, true, true);
        LocalizedComponentsLocateResult componentsLocateResults = LocatePlugin.getDefault().getLocalizedComponentsLocateResult(type.getUnderlyingResource());
        IFile wodFile = componentsLocateResults.getFirstWodFile();
        if (wodFile != null) {
          WorkbenchUtilities.open(wodFile, ComponentEditor.ID);
        }
      }
    } catch (Throwable e1) {
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

          IJavaProject javaProject = this.getJavaProject();
          if (javaProject != null) {
            IFile wodFile = null;
            try {
              ComponentLocateScope componentLocateScope = ComponentLocateScope.createLocateScope(javaProject.getProject(), fileName);
              LocalizedComponentsLocateResult localizedComponentsLocateResult = new LocalizedComponentsLocateResult();
              Locate locate = new Locate(componentLocateScope, localizedComponentsLocateResult);
              locate.locate();
              wodFile = localizedComponentsLocateResult.getFirstWodFile();
            } catch (CoreException e) {
              LaunchingPlugin.getDefault().log(e);
            } catch (LocateException e) {
              LaunchingPlugin.getDefault().log(e);
            }
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  private void createChanges() throws CoreException, OperationCanceledException {
    IFile oldApiFile = null;
    IFolder[] oldWoFolders = new IFolder[0];
 
    try {
      LocalizedComponentsLocateResult result =
        LocatePlugin.getDefault().getLocalizedComponentsLocateResult(getResource());
      if (result != null) {
        oldWoFolders = result.getComponents();
        oldApiFile = result.getDotApi();
      }
    } catch (LocateException e) {
      throw new CoreException(new Status(IStatus.ERROR, RefactoringPlugin.getDefault().getBundleID(), IStatus.ERROR, "Could not locate component: " + _resourcePath.lastSegment(), null)); //$NON-NLS-1$
    }
    if (oldApiFile != null || oldWoFolders.length > 0) {
View Full Code Here

Examples of org.objectstyle.wolips.locate.result.LocalizedComponentsLocateResult

  private ICompilationUnit getCompilationUnit() {
    if (_compilationUnit != null) {
      return _compilationUnit;
    }
    try {
      LocalizedComponentsLocateResult results = locate.getLocalizedComponentsLocateResult(getResource());
      if (results != null) {
        IType javaType = results.getDotJavaType();
        if (javaType != null)
          _compilationUnit = javaType.getCompilationUnit();       
      }
    } catch (CoreException e) {
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.