Search in sources :

Example 46 with Project

use of org.eclipse.che.ide.api.resources.Project in project che by eclipse.

the class ShowStatusAction method actionPerformed.

/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
    final Project project = appContext.getRootProject();
    checkState(project != null, "Null project occurred");
    presenter.showStatus(project);
}
Also used : Project(org.eclipse.che.ide.api.resources.Project)

Example 47 with Project

use of org.eclipse.che.ide.api.resources.Project in project che by eclipse.

the class CompareWithRevisionAction method actionPerformed.

/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
    final Project project = appContext.getRootProject();
    final Resource resource = appContext.getResource();
    checkState(project != null, "Null project occurred");
    checkState(resource instanceof File, "Invalid file occurred");
    presenter.showRevisions(project, (File) resource);
}
Also used : Project(org.eclipse.che.ide.api.resources.Project) Resource(org.eclipse.che.ide.api.resources.Resource) File(org.eclipse.che.ide.api.resources.File)

Example 48 with Project

use of org.eclipse.che.ide.api.resources.Project in project che by eclipse.

the class FetchAction method actionPerformed.

/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
    final Project project = appContext.getRootProject();
    checkState(project != null, "Null project occurred");
    presenter.showDialog(project);
}
Also used : Project(org.eclipse.che.ide.api.resources.Project)

Example 49 with Project

use of org.eclipse.che.ide.api.resources.Project in project che by eclipse.

the class GitAction method updateInPerspective.

@Override
public void updateInPerspective(@NotNull ActionEvent event) {
    event.getPresentation().setVisible(true);
    final Project project = appContext.getRootProject();
    event.getPresentation().setEnabled(project != null && GitUtil.isUnderGit(project));
}
Also used : Project(org.eclipse.che.ide.api.resources.Project)

Example 50 with Project

use of org.eclipse.che.ide.api.resources.Project in project che by eclipse.

the class InitRepositoryAction method updateInPerspective.

@Override
public void updateInPerspective(@NotNull ActionEvent event) {
    super.updateInPerspective(event);
    final Project project = appContext.getRootProject();
    event.getPresentation().setEnabled(project != null && !GitUtil.isUnderGit(project));
}
Also used : Project(org.eclipse.che.ide.api.resources.Project)

Aggregations

Project (org.eclipse.che.ide.api.resources.Project)127 Resource (org.eclipse.che.ide.api.resources.Resource)74 OperationException (org.eclipse.che.api.promises.client.OperationException)53 Operation (org.eclipse.che.api.promises.client.Operation)51 PromiseError (org.eclipse.che.api.promises.client.PromiseError)48 VirtualFile (org.eclipse.che.ide.api.resources.VirtualFile)24 CLIOutputResponse (org.eclipse.che.plugin.svn.shared.CLIOutputResponse)18 Promise (org.eclipse.che.api.promises.client.Promise)16 EditorPartPresenter (org.eclipse.che.ide.api.editor.EditorPartPresenter)14 Container (org.eclipse.che.ide.api.resources.Container)14 List (java.util.List)12 StatusNotification (org.eclipse.che.ide.api.notification.StatusNotification)12 Path (org.eclipse.che.ide.resource.Path)12 Optional (com.google.common.base.Optional)11 ArrayList (java.util.ArrayList)10 File (org.eclipse.che.ide.api.resources.File)10 Credentials (org.eclipse.che.ide.api.subversion.Credentials)10 FunctionException (org.eclipse.che.api.promises.client.FunctionException)9 JavaUtil.isJavaProject (org.eclipse.che.ide.ext.java.client.util.JavaUtil.isJavaProject)9 TextEditor (org.eclipse.che.ide.api.editor.texteditor.TextEditor)8