Java 类org.eclipse.ui.actions.NewProjectAction 实例源码
项目:team-explorer-everywhere
文件:ImportWizardNewProjectAction.java
@Override
public void run() {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
final NewProjectAction newProjectAction =
new NewProjectAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
newProjectAction.run();
}
});
}
项目:gwt-eclipse-plugin
文件:AbstractOpenWizardAction.java
/**
* Opens the new project dialog if the workspace is empty. This method is
* called on {@link #run()}.
*
* @param shell the shell to use
* @return returns <code>true</code> when a project has been created, or
* <code>false</code> when the new project has been canceled.
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) {
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
if (workspaceRoot.getProjects().length == 0) {
String title = NewWizardMessages.AbstractOpenWizardAction_noproject_title;
String message = NewWizardMessages.AbstractOpenWizardAction_noproject_message;
if (MessageDialog.openQuestion(shell, title, message)) {
new NewProjectAction().run();
return workspaceRoot.getProjects().length != 0;
}
return false;
}
return true;
}
项目:Eclipse-Postfix-Code-Completion
文件:AbstractOpenWizardAction.java
/**
* Opens the new project dialog if the workspace is empty. This method is called on {@link #run()}.
* @param shell the shell to use
* @return returns <code>true</code> when a project has been created, or <code>false</code> when the
* new project has been canceled.
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) {
IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
if (workspaceRoot.getProjects().length == 0) {
String title= NewWizardMessages.AbstractOpenWizardAction_noproject_title;
String message= NewWizardMessages.AbstractOpenWizardAction_noproject_message;
if (MessageDialog.openQuestion(shell, title, message)) {
new NewProjectAction().run();
return workspaceRoot.getProjects().length != 0;
}
return false;
}
return true;
}
项目:Eclipse-Postfix-Code-Completion
文件:OpenTypeAction.java
/**
* Opens the new project dialog if the workspace is empty.
* @param parent the parent shell
* @return returns <code>true</code> when a project has been created, or <code>false</code> when the
* new project has been canceled.
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell parent) {
IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
if (workspaceRoot.getProjects().length == 0) {
String title= JavaUIMessages.OpenTypeAction_dialogTitle;
String message= JavaUIMessages.OpenTypeAction_createProjectFirst;
if (MessageDialog.openQuestion(parent, title, message)) {
new NewProjectAction().run();
return workspaceRoot.getProjects().length != 0;
}
return false;
}
return true;
}
项目:Eclipse-Postfix-Code-Completion-Juno38
文件:AbstractOpenWizardAction.java
/**
* Opens the new project dialog if the workspace is empty. This method is called on {@link #run()}.
* @param shell the shell to use
* @return returns <code>true</code> when a project has been created, or <code>false</code> when the
* new project has been canceled.
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) {
IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
if (workspaceRoot.getProjects().length == 0) {
String title= NewWizardMessages.AbstractOpenWizardAction_noproject_title;
String message= NewWizardMessages.AbstractOpenWizardAction_noproject_message;
if (MessageDialog.openQuestion(shell, title, message)) {
new NewProjectAction().run();
return workspaceRoot.getProjects().length != 0;
}
return false;
}
return true;
}
项目:Eclipse-Postfix-Code-Completion-Juno38
文件:OpenTypeAction.java
/**
* Opens the new project dialog if the workspace is empty.
* @param parent the parent shell
* @return returns <code>true</code> when a project has been created, or <code>false</code> when the
* new project has been canceled.
*/
protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell parent) {
IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
if (workspaceRoot.getProjects().length == 0) {
String title= JavaUIMessages.OpenTypeAction_dialogTitle;
String message= JavaUIMessages.OpenTypeAction_createProjectFirst;
if (MessageDialog.openQuestion(parent, title, message)) {
new NewProjectAction().run();
return workspaceRoot.getProjects().length != 0;
}
return false;
}
return true;
}