Package org.eclipse.php.core.libfolders

Examples of org.eclipse.php.core.libfolders.LibraryFolderManager


   * @throws CoreException
   *             if any of the folders does not exist or is in a closed
   *             project
   */
  private void updatePhpExplorer(IFolder[] folders) throws CoreException {
    LibraryFolderManager lfm = LibraryFolderManager.getInstance();
    final IFolder[] subfolders = lfm.getAllSubfolders(folders);

    // make sure the actual update in the PHP Explorer is executed in the UI
    // thread
    Display.getDefault().asyncExec(new Runnable() {
      @SuppressWarnings("restriction")
View Full Code Here


  @Override
  public void run() {
    boolean askForConfirmation = false;
    Collection<IResource> explicitlyDisabledFolders = new HashSet<IResource>();
    LibraryFolderManager lfm = LibraryFolderManager.getInstance();

    // check if any of the selected library folders is an explicitly
    // disabled library folder
    for (IFolder folder : fFolders) {
      IFolder explicitlyDisabledParent = lfm
          .getExplicitlyDisabledParent(folder);
      explicitlyDisabledFolders.add(explicitlyDisabledParent);

      if (!folder.equals(explicitlyDisabledParent)) {
        // there is a selected folder which is not an explicitly
View Full Code Here

              .get(PHPPluginImages.IMG_OBJS_PHP_FOLDER);
      } else {// in build path ...
        if (modelElement.getElementType() == IModelElement.PROJECT_FRAGMENT
            || modelElement.getElementType() == IModelElement.SCRIPT_FOLDER
            || element instanceof IFolder) {
          LibraryFolderManager lfm = LibraryFolderManager
              .getInstance();
          if (lfm.isInLibraryFolder(modelElement.getResource())) {
            return PHPPluginImages
                .get(PHPPluginImages.IMG_OBJS_PHP_LIBFOLDER);
          } else {
            return PHPPluginImages
                .get(PHPPluginImages.IMG_OBJS_PHPFOLDER_ROOT);
View Full Code Here

  private static ImageDescriptor getFolderBaseImage(IResource resource) {
    IModelElement modelElement = DLTKCore.create(resource);

    if (null != modelElement) {
      if (modelElement instanceof IScriptFolder) {
        LibraryFolderManager lfm = LibraryFolderManager.getInstance();
        if (lfm.isInLibraryFolder(modelElement.getResource()))
          return PHPPluginImages.DESC_OBJS_PHP_LIBFOLDER;
        else
          return PHPPluginImages.DESC_OBJS_PHPFOLDER_ROOT;
      }
    } else {
View Full Code Here

    WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
      @Override
      protected void execute(IProgressMonitor monitor)
          throws CoreException, InvocationTargetException,
          InterruptedException {
        LibraryFolderManager lfm = LibraryFolderManager.getInstance();
        lfm.useAsLibraryFolder(fFolders, monitor);
      }
    };

    try {
      PlatformUI.getWorkbench().getProgressService().busyCursorWhile(op);
View Full Code Here

  @Override
  public IStatus runInWorkspace(IProgressMonitor monitor)
      throws CoreException {

    LibraryFolderManager lfm = LibraryFolderManager.getInstance();

    for (IProject project : fProjects) {
      // check if the user has already marked any folders as library
      // folders or source folders
      if (!hasDisabledPreference(project)) {
        // check the extension point for common library folder names
        String[] names = getCommonLibraryFolderNames(project);

        // find these folders in the project
        IFolder[] folders = getFoldersFromNames(project, names);

        // mark the folders as library folders
        try {
          lfm.useAsLibraryFolder(folders, monitor);
        } catch (Exception e) {
          return new Status(IStatus.ERROR, PHPCorePlugin.ID,
              e.getLocalizedMessage(), e);
        }
      }
View Full Code Here

  protected boolean initialize(Object element) {
    fFolder = getFolder(element);
    if (fFolder == null)
      return false;

    LibraryFolderManager lfm = LibraryFolderManager.getInstance();

    // the participant takes place only if the folder is explicitly disabled
    // in the WTP Validation Framework
    return lfm.isExplicitlyDisabled(fFolder);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.php.core.libfolders.LibraryFolderManager

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.