本文整理汇总了Java中org.netbeans.spi.project.ui.CustomizerProvider类的典型用法代码示例。如果您正苦于以下问题:Java CustomizerProvider类的具体用法?Java CustomizerProvider怎么用?Java CustomizerProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomizerProvider类属于org.netbeans.spi.project.ui包,在下文中一共展示了CustomizerProvider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refresh
import org.netbeans.spi.project.ui.CustomizerProvider; //导入依赖的package包/类
protected @Override void refresh(Lookup context, boolean immediate) {
super.refresh(context, immediate);
Project[] projects = ActionsUtil.getProjectsFromLookup( context, null );
if ( projects.length != 1 || projects[0].getLookup().lookup( CustomizerProvider.class ) == null ) {
setEnabled( false );
// setDisplayName( ActionsUtil.formatProjectSensitiveName( namePattern, new Project[0] ) );
}
else {
setEnabled( true );
// setDisplayName( ActionsUtil.formatProjectSensitiveName( namePattern, projects ) );
}
}
示例2: enhanceProject
import org.netbeans.spi.project.ui.CustomizerProvider; //导入依赖的package包/类
@Override
protected void enhanceProject(TestProject prj) {
CustomizerProvider customizer = new CustomizerProvider() {
public void showCustomizer() {
}
};
prj.setLookup(Lookups.singleton(customizer));
}
示例3: actionPerformed
import org.netbeans.spi.project.ui.CustomizerProvider; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
CustomizerProvider2 cp2 = project.getLookup().lookup(CustomizerProvider2.class);
if (cp2 != null) {
cp2.showCustomizer(nodeName, panelName);
} else {
CustomizerProvider cp = project.getLookup().lookup(CustomizerProvider.class);
if (cp != null) {
cp.showCustomizer();
}
}
}
示例4: showCustomizer
import org.netbeans.spi.project.ui.CustomizerProvider; //导入依赖的package包/类
public static void showCustomizer(Project project) {
if (project == null) {
return;
}
CustomizerProvider provider = project.getLookup().lookup(CustomizerProvider.class);
if (provider != null) {
if (provider instanceof CustomizerProvider2) {
((CustomizerProvider2) provider).showCustomizer(CodicCustomizerProvider.CATEGORY_NAME, null);
return;
}
provider.showCustomizer();
}
}