Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IScriptProject


 
  public static List<IEvaluatedType> collectParameterTypes(IMethod method) throws ModelException {
   
    List<IEvaluatedType> evaluated = new ArrayList<IEvaluatedType>();
   
    IScriptProject project = method.getScriptProject();
   
    if (project == null)
      return evaluated;
   
    IType currentNamespace = PHPModelUtils.getCurrentNamespace(method);
View Full Code Here


   *            Note: if the given project is not the ModelElement's project, then the full handle is returned
   */
  public static String elementToHandle(final String project, final IModelElement element) {
    final String handle = element.getHandleIdentifier();
    if (project != null && !(element instanceof IScriptProject)) {
      IScriptProject phpProject = element.getScriptProject();
      if (project.equals(phpProject.getElementName())) {
        final String id = phpProject.getHandleIdentifier();

        return handle.substring(id.length());
      }
    }

View Full Code Here

   */
  public static IModelElement handleToElement(final WorkingCopyOwner owner, final String project, final String handle, final boolean check) {
    IModelElement element = owner == null ? element = DLTKCore.create(handle) : DLTKCore.create(handle, owner);

    if (element == null && project != null) {
      final IScriptProject phpProject = DLTKCore.create(ResourcesPlugin.getWorkspace().getRoot()).getScriptProject(project);
      final String identifier = phpProject.getHandleIdentifier();
      element = owner == null ? DLTKCore.create(identifier + handle) : DLTKCore.create(identifier + handle, owner);
    }

    if (check && element instanceof IMethod) {
      /*
 
View Full Code Here

      try {
        IScriptProject[] projects = DLTKCore.create(
            ResourcesPlugin.getWorkspace().getRoot())
            .getScriptProjects();
        for (int i = 0; i < projects.length; i++) {
          IScriptProject curr = projects[i];
          if (hasProjectSpecificOptions(curr.getProject())) {
            projectsWithSpecifics.add(curr);
          }
        }
      } catch (ModelException e) {
        // ignore
      }
      ProjectSelectionDialog dialog = new ProjectSelectionDialog(
          getShell(), projectsWithSpecifics);
      if (dialog.open() == Window.OK) {
        IScriptProject res = (IScriptProject) dialog.getFirstResult();
        openProjectProperties(res.getProject(), data);
      }
    }
  }
View Full Code Here

   */
  public static String getSetterStub(IField field, String setterName, String typeName, boolean addComments, int flags, String indent, boolean fluent) throws CoreException {
   
    String fieldName= field.getElementName();
    IType parentType= field.getDeclaringType();
    IScriptProject project= field.getScriptProject();
    String accessorName = fieldName;
   
    String commentTypeName = typeName != null ? typeName : "unknown_type";
     

View Full Code Here

  @Override
  protected QuerySpecification createQuery(INamedElement defunit) throws ModelException {
    DLTKSearchScopeFactory factory= DLTKSearchScopeFactory.getInstance();
    ScriptEditor editor= deeEditor;
   
    IScriptProject scriptProject = deeEditor.getInputModelElement().getScriptProject();
   
    IDLTKSearchScope scope;
    String description;
    boolean isInsideInterpreterEnvironment = isInsideInterpreterEnv(defunit, factory);
    if (editor != null) {
View Full Code Here

  String getOperationUnavailableMessage() {
    return "This operation is not available for the selected element.";
  }
 
  protected boolean isInsideInterpreterEnv(INamedElement defunit, DLTKSearchScopeFactory factory) throws ModelException {
    IScriptProject scriptProject = deeEditor.getInputModelElement().getScriptProject();
   
    boolean isInsideInterpreterEnvironment;
    String moduleFQName = defunit.getModuleFullyQualifiedName();
    if(moduleFQName == null) {
      isInsideInterpreterEnvironment = false;
View Full Code Here

 
  public static IProject createLangProject(String name, boolean overwrite) throws CoreException {
    IProject project = createAndOpenProject(name, overwrite);
    setupLangProject(project, false);
   
    IScriptProject scriptProject = DLTKCore.create(project);
    scriptProject.setRawBuildpath(new IBuildpathEntry[] {}, null);
   
    assertTrue(scriptProject.exists());
    return project;
  }
View Full Code Here

    addSourceFolder(destFolder);
  }
 
  /** Setup the given folder as a source folder. */
  public static IProjectFragment addSourceFolder(IContainer folder) throws CoreException {
    IScriptProject dltkProj = DLTKCore.create(folder.getProject());
    IProjectFragment fragment = dltkProj.getProjectFragment(folder);
    if(!fragment.exists()) {
      IBuildpathEntry[] bpentries = dltkProj.getRawBuildpath();
      IBuildpathEntry entry = DLTKCore.newSourceEntry(fragment.getPath());
      dltkProj.setRawBuildpath(ArrayUtil.concat(bpentries, entry), null);
    }
    return fragment;
  }
View Full Code Here

      @Override
      public void run(IProgressMonitor monitor) throws CoreException {
        setupDeeProject(project, libraryBuildpathEntry);
      }
    }, null);
    IScriptProject scriptProject = DLTKCore.create(project);
//    scriptProject.setOption(DLTKCore.INDEXER_ENABLED, false ? DLTKCore.ENABLED : DLTKCore.DISABLED);
//    scriptProject.setOption(DLTKCore.BUILDER_ENABLED, false ? DLTKCore.ENABLED : DLTKCore.DISABLED);
   
    checkInstall(scriptProject, installTypeId, installId);
    return scriptProject;
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.IScriptProject

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.