本文整理匯總了Java中com.intellij.openapi.roots.ModifiableRootModel.getProject方法的典型用法代碼示例。如果您正苦於以下問題:Java ModifiableRootModel.getProject方法的具體用法?Java ModifiableRootModel.getProject怎麽用?Java ModifiableRootModel.getProject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.roots.ModifiableRootModel
的用法示例。
在下文中一共展示了ModifiableRootModel.getProject方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupRootModel
import com.intellij.openapi.roots.ModifiableRootModel; //導入方法依賴的package包/類
@Override
public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
super.setupRootModel(rootModel);
addListener(new ModuleBuilderListener() {
@Override
public void moduleCreated(@NotNull Module module) {
setMuleFramework(module);
}
});
setMuleFacet(rootModel.getModule());
final Project project = rootModel.getProject();
final VirtualFile root = createAndGetContentEntry();
rootModel.addContentEntry(root);
//Check if this is a module and has parent
final MavenId parentId = (this.getParentProject() != null ? this.getParentProject().getMavenId() : null);
MavenUtil.runWhenInitialized(project, (DumbAwareRunnable) () -> {
new MuleMavenProjectBuilderHelper().configure(project, getProjectId(), muleVersion, root, parentId);
});
}
示例2: setupRootModel
import com.intellij.openapi.roots.ModifiableRootModel; //導入方法依賴的package包/類
public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
final Project project = rootModel.getProject();
final VirtualFile root = createAndGetContentEntry();
rootModel.addContentEntry(root);
// todo this should be moved to generic ModuleBuilder
if (myJdk != null){
rootModel.setSdk(myJdk);
} else {
rootModel.inheritSdk();
}
MavenUtil.runWhenInitialized(project, new DumbAwareRunnable() {
public void run() {
if (myEnvironmentForm != null) {
myEnvironmentForm.setData(MavenProjectsManager.getInstance(project).getGeneralSettings());
}
new MavenModuleBuilderHelper(myProjectId, myAggregatorProject, myParentProject, myInheritGroupId,
myInheritVersion, myArchetype, myPropertiesToCreateByArtifact, "Create new Maven module").configure(project, root, false);
}
});
}
示例3: setupRootModel
import com.intellij.openapi.roots.ModifiableRootModel; //導入方法依賴的package包/類
@Override
public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
super.setupRootModel(rootModel);
setMuleFacet(rootModel.getModule());
final Project project = rootModel.getProject();
final VirtualFile root = createAndGetContentEntry();
rootModel.addContentEntry(root);
MavenUtil.runWhenInitialized(project, (DumbAwareRunnable) () -> new MuleDomainMavenProjectBuilderHelper().configure(project, getProjectId(), muleVersion, root));
}
示例4: setupRootModel
import com.intellij.openapi.roots.ModifiableRootModel; //導入方法依賴的package包/類
@Override
public void setupRootModel(final @NotNull ModifiableRootModel rootModel) throws ConfigurationException {
final Project project = rootModel.getProject();
// in IntelliJ wizard user is able to choose SDK (i.e. for "java library" module), so set it
if (myJdk != null){
rootModel.setSdk(myJdk);
} else {
rootModel.inheritSdk();
}
if (myProject == null) {
project.putUserData(ExternalSystemDataKeys.NEWLY_IMPORTED_PROJECT, Boolean.TRUE);
}
StartupManager.getInstance(project).runWhenProjectIsInitialized(new DumbAwareRunnable() {
@Override
public void run() {
DumbService.getInstance(project).smartInvokeLater(new Runnable() {
@Override
public void run() {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
if (myProject == null) {
myWizardState.putSdkDependentParams();
myWizardState.put(ATTR_PROJECT_LOCATION, project.getBasePath());
AssetStudioAssetGenerator assetGenerator = new AssetStudioAssetGenerator(myWizardState);
NewProjectWizard.createProject(myWizardState, project, assetGenerator);
}
else {
myWizardState.put(ATTR_MODULE_NAME, getName());
createModule();
}
}
});
}
});
}
});
}