Tabnine Logo
ResourceNode$NodeFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceNode$NodeFactory
in
org.eclipse.che.ide.resources.tree

Best Java code snippets using org.eclipse.che.ide.resources.tree.ResourceNode$NodeFactory (Showing top 7 results out of 315)

origin: org.eclipse.che.core/che-core-ide-app

public void show(Resource[] resources, boolean showFiles, SelectionPathHandler handler) {
 checkArgument(resources != null, "Null resources occurred");
 if (resources.length == 0) {
  view.setStructure(Collections.<Node>emptyList(), showFiles);
  return;
 }
 final List<Node> nodes = new ArrayList<>();
 final NodeSettings settings = settingsProvider.getSettings();
 for (Resource resource : resources) {
  if (resource.getResourceType() == Resource.FILE && !showFiles) {
   continue;
  }
  final Node node;
  if (resource.getResourceType() == Resource.FILE) {
   node = nodeFactory.newFileNode((File) resource, settings);
  } else {
   node = nodeFactory.newContainerNode((Container) resource, settings);
  }
  nodes.add(node);
 }
 view.setStructure(nodes, showFiles);
 this.handler = handler;
 view.showDialog();
}
origin: org.eclipse.che.core/che-core-ide-app

 node = nodeFactory.newContainerNode((Container) resource, nodeSettings);
 tree.getNodeStorage().add(node);
 if (expanded) {
} else {
 tree.getNodeStorage()
   .add(nodeFactory.newContainerNode((Container) resource, nodeSettings));
origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client

/**
 * Show tree view with all needed nodes of the workspace.
 *
 * @param pagePresenter delegate from the property page
 * @param nodeInterceptor interceptor for showing nodes
 * @param forCurrent if is true - show only current project, otherwise - whole workspace
 */
public void show(
  ClasspathPagePresenter pagePresenter,
  ClasspathNodeInterceptor nodeInterceptor,
  boolean forCurrent) {
 this.classpathPagePresenter = pagePresenter;
 this.interceptor = nodeInterceptor;
 if (forCurrent) {
  final Project project = appContext.getRootProject();
  view.setStructure(
    Collections.<Node>singletonList(
      nodeFactory.newContainerNode(project, settingsProvider.getSettings())),
    interceptor);
 } else {
  final List<Node> nodes = new ArrayList<>();
  for (Project project : appContext.getProjects()) {
   nodes.add(nodeFactory.newContainerNode(project, settingsProvider.getSettings()));
  }
  view.setStructure(nodes, interceptor);
 }
 view.showDialog();
}
origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client

/**
 * Show tree view with all needed nodes of the workspace.
 *
 * @param presenter delegate from the page
 */
public void show(JavaCommandPagePresenter presenter) {
 this.delegate = presenter;
 final List<Node> nodes = new ArrayList<>();
 for (Project project : appContext.getProjects()) {
  nodes.add(nodeFactory.newContainerNode(project, settingsProvider.getSettings()));
 }
 view.setStructure(nodes);
 view.showDialog();
}
origin: org.eclipse.che.core/che-core-ide-app

 protected Node createNode(Resource resource) {
  checkArgument(resource != null, "Not a resource");

  switch (resource.getResourceType()) {
   case PROJECT:
   case FOLDER:
    return nodeFactory.newContainerNode((Container) resource, getSettings());
   case FILE:
    return nodeFactory.newFileNode((File) resource, getSettings());
   default:
    throw new IllegalArgumentException("Resource type was not recognized");
  }
 }
}
origin: org.eclipse.che.core/che-core-ide-app

/**
 * Show tree view with all root nodes of the workspace.
 *
 * @param searcher delegate from the root widget of the full-text-search mechanism
 */
public void show(FullTextSearchView.ActionDelegate searcher) {
 this.searcher = searcher;
 List<Node> rootNodes = newArrayList();
 for (Project project : appContext.getProjects()) {
  rootNodes.add(nodeFactory.newContainerNode(project, settingsProvider.getSettings()));
 }
 view.setStructure(rootNodes);
 view.showDialog();
}
origin: org.eclipse.che.core/che-core-ide-app

/**
 * Set recent file list.
 *
 * @param recentFiles recent file list
 */
public void setRecentFiles(List<File> recentFiles) {
 final List<FileNode> nodes = newArrayListWithCapacity(recentFiles.size());
 for (File recentFile : recentFiles) {
  nodes.add(nodeFactory.newFileNode(recentFile, settingsProvider.getSettings()));
 }
 view.setRecentFiles(nodes);
}
org.eclipse.che.ide.resources.treeResourceNode$NodeFactory

Most used methods

  • newContainerNode
  • newFileNode

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • Kernel (java.awt.image)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now