当前位置: 首页>>代码示例>>Java>>正文


Java ProjectCustomizer类代码示例

本文整理汇总了Java中org.netbeans.spi.project.ui.support.ProjectCustomizer的典型用法代码示例。如果您正苦于以下问题:Java ProjectCustomizer类的具体用法?Java ProjectCustomizer怎么用?Java ProjectCustomizer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProjectCustomizer类属于org.netbeans.spi.project.ui.support包,在下文中一共展示了ProjectCustomizer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SuiteCustomizerBasicBranding

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
/**
 * Creates new form SuiteCustomizerLibraries
 */
public SuiteCustomizerBasicBranding(final SuiteProperties suiteProps, ProjectCustomizer.Category cat, 
        BasicCustomizer.SubCategoryProvider prov) {
    super(suiteProps, SuiteCustomizerBasicBranding.class, cat);
    initComponents();        
    this.prov = prov;
    refresh(); 
    checkValidity();
    DocumentListener textFieldChangeListener = new UIUtil.DocumentAdapter() {
        @Override
        public void insertUpdate(DocumentEvent e) {
            checkValidity();
        }
    };
    nameValue.getDocument().addDocumentListener(textFieldChangeListener);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:SuiteCustomizerBasicBranding.java

示例2: showCustomizer

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@Messages({
    "PROGRESS_loading_data=Loading project information",
    "# {0} - project display name", "LBL_CustomizerTitle=Project Properties - {0}"
})
public void showCustomizer(String preselectedCategory, final String preselectedSubCategory) {
    if (dialog != null) {
        dialog.setVisible(true);
    } else {
        final String category = (preselectedCategory != null) ? preselectedCategory : lastSelectedCategory;
        final AtomicReference<Lookup> context = new AtomicReference<Lookup>();
        ProgressUtils.runOffEventDispatchThread(new Runnable() {
            @Override public void run() {
                context.set(new ProxyLookup(prepareData(), Lookups.fixed(new SubCategoryProvider(category, preselectedSubCategory))));
            }
        }, PROGRESS_loading_data(), /* currently unused */new AtomicBoolean(), false);
        if (context.get() == null) { // canceled
            return;
        }
        OptionListener listener = new OptionListener();
        dialog = ProjectCustomizer.createCustomizerDialog(layerPath, context.get(), category, listener, null);
        dialog.addWindowListener(listener);
        dialog.setTitle(LBL_CustomizerTitle(ProjectUtils.getInformation(getProject()).getDisplayName()));
        dialog.setVisible(true);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:BasicCustomizer.java

示例3: findCategoryByName

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
private static ProjectCustomizer.Category findCategoryByName( String name, ProjectCustomizer.Category[] categories ) {
    
    for( int i = 0; i < categories.length; i++ ) {
        if ( name.equals( categories[i].getName() ) ) {
            return categories[i];
        }
        
        ProjectCustomizer.Category[] subcategories = categories[i].getSubcategories();
        if ( subcategories != null ) {
            ProjectCustomizer.Category category = findCategoryByName( name, subcategories );
            if ( category != null ) {
                return category;
            }
        }
        
    }
    
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:CategoryModel.java

示例4: createComponent

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@Override
public JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {
    final BuildCustomizerPanel panel = new BuildCustomizerPanel();
    Project prj = context.lookup(Project.class);
    if (prj != null) {
        final BuildVariant buildVariant = prj.getLookup().lookup(BuildVariant.class);
        if (buildVariant != null) {
            panel.setData(buildVariant);
            category.setStoreListener(new ActionListener() {

                @Override
                public void actionPerformed(ActionEvent e) {
                    buildVariant.setVariantName(panel.getData());
                }
            });
        }
    }
    return panel;
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:20,代码来源:BuildCustomizerProvider.java

示例5: findNode

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
private Node findNode( ProjectCustomizer.Category category, Node node ) {

        Children ch = node.getChildren();

        if ( ch != null && ch != Children.LEAF ) {
            Node nodes[] = ch.getNodes( true );

            if ( nodes != null ) {
                for (Node child : nodes) {
                    ProjectCustomizer.Category cc = child.getLookup().lookup(ProjectCustomizer.Category.class);

                    if ( cc == category ) {
                        return child;
                    }
                    else {
                        Node n = findNode(category, child);
                        if ( n != null ) {
                            return n;
                        }
                    }
                }
            }
        }

        return null;
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:CategoryView.java

示例6: propertyChange

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {

        Object source = evt.getSource();
        String propertyName = evt.getPropertyName();

        if ( source== manager && ExplorerManager.PROP_SELECTED_NODES.equals( propertyName ) ) {
            Node nodes[] = manager.getSelectedNodes();
            if ( nodes == null || nodes.length <= 0 ) {
                return;
            }
            Node node = nodes[0];

            ProjectCustomizer.Category category = node.getLookup().lookup(ProjectCustomizer.Category.class);
            if ( category != categoryModel.getCurrentCategory() ) {
                categoryModel.setCurrentCategory( category );
            }
        }

        if ( source == categoryModel && CategoryModel.PROP_CURRENT_CATEGORY.equals( propertyName ) ) {
            selectNode( (ProjectCustomizer.Category)evt.getNewValue() );
        }

    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:CategoryView.java

示例7: AndroidProjectSdkConfig

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
/**
 * Creates new form AndroidProjectSdkConfig
 */
public AndroidProjectSdkConfig(ProjectCustomizer.Category category, Lookup context) {
    initComponents();
    this.category = category;
    this.context = context;
    NbGradleProject project = context.lookup(NbGradleProject.class);
    sdk = project.getLookup().lookup(AndroidSdk.class);
    androidGradleExtension = project.getLookup().lookup(AndroidGradleExtensionV2.class);
    if (sdk != null && androidGradleExtension != null) {
        sdkList.setModel(new DefaultComboBoxModel(AndroidSdkProvider.getInstalledSDKs()));
        sdkList.setSelectedItem(sdk);
        AndroidSdkProvider.getDefault().addPropertyChangeListener(WeakListeners.propertyChange(this, AndroidSdkProvider.PROP_INSTALLED_SDKS, AndroidSdkProvider.getDefault()));
    }
    System.out.println("org.nbandroid.netbeans.gradle.v2.project.ui.AndroidProjectSdkConfig.<init>()");
    category.setStoreListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (!sdk.equals(sdkList.getSelectedItem())) {
                androidGradleExtension.propertyChange(new PropertyChangeEvent(this, PROPERTY_CHANGE_SDK, null, sdkList.getSelectedItem()));
            }
        }
    });
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:26,代码来源:AndroidProjectSdkConfig.java

示例8: createCategory

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@Override
public ProjectCustomizer.Category createCategory(Lookup context) {
    // suppress panel for JEE projects ... generally anything other than JAR packaging
    // type:
    Project p = context.lookup(Project.class);
    if (p == null) {
        return null;
    }
    NbMavenProject mvnProject = p.getLookup().lookup(NbMavenProject.class);
    if (mvnProject == null || 
        !NbMavenProject.TYPE_JAR.equals(mvnProject.getPackagingType())) {
        return null;
    }
    return ProjectCustomizer.Category.create(
            CATEGORY,
            Bundle.CAT_RunJShell(),
            null
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:JShellCategoryProvider.java

示例9: createCategory

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@Override
public Category createCategory(Lookup context) {
    Project project = context.lookup(Project.class);
    NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
    String effPackaging = watcher.getPackagingType();
    String[] types = PluginPropertyUtils.getPluginPropertyList(project, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, "supportedProjectTypes", "supportedProjectType", /*"bundle" would not work for GlassFish parent POM*/null);
    if (types != null) {
        for (String type : types) {
            if (effPackaging.equals(type)) {
                effPackaging = NbMavenProject.TYPE_OSGI;
            }
        }
    }
    if (NbMavenProject.TYPE_OSGI.equalsIgnoreCase(effPackaging)) {
        return ProjectCustomizer.Category.create(
                ModelHandle2.PANEL_COMPILE,
                org.openide.util.NbBundle.getMessage(PackagesPanelProvider.class, "TIT_Packages"),
                null);
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:PackagesPanelProvider.java

示例10: createCategory

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@Override
public Category createCategory(Lookup context) {
    boolean fxProjectEnabled = true;
    final Project project = context.lookup(Project.class);
    if (project != null) {
        final J2SEPropertyEvaluator j2sepe = project.getLookup().lookup(J2SEPropertyEvaluator.class);
        fxProjectEnabled = JFXProjectProperties.isTrue(j2sepe.evaluator().getProperty(JFXProjectProperties.JAVAFX_ENABLED)) //NOI18N
                && !JFXProjectProperties.isTrue(j2sepe.evaluator().getProperty(JFXProjectProperties.JAVAFX_PRELOADER)); //NOI18N
    }
    if(fxProjectEnabled) {
        return ProjectCustomizer.Category.create(CAT_RUN,
                NbBundle.getMessage(JFXRunCategoryProvider.class, "LBL_Category_Run"), null); //NOI18N
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:JFXRunCategoryProvider.java

示例11: CustomizerDisplay

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
CustomizerDisplay(final SingleModuleProperties props, ProjectCustomizer.Category cat) {
    super(props, CustomizerDisplay.class, cat);
    initComponents();
    initAccessibility();
    refresh();
    checkValidity();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:CustomizerDisplay.java

示例12: NbPropertyPanel

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@SuppressWarnings("LeakingThisInConstructor")
NbPropertyPanel(@NonNull ModuleProperties props, Class<?> helpCtxClass, ProjectCustomizer.Category cat) {
    this.props = props;
    category = cat;
    props.addLazyStorage(this);
    initComponents();
    props.addPropertyChangeListener(this);
    this.helpCtxClass = helpCtxClass;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:NbPropertyPanel.java

示例13: CustomizerSources

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
CustomizerSources(final SingleModuleProperties props, ProjectCustomizer.Category category) {
    super(props, CustomizerSources.class, category);
    initComponents();
    initAccessibility();
    refresh();
    srcLevelValue.addActionListener(new ActionListener() { // #66278
        public void actionPerformed(ActionEvent e) {
            if (srcLevelValueBeingUpdated) {
                return;
            }
            final String oldLevel = getProperty(SingleModuleProperties.JAVAC_SOURCE);
            final String newLevel = (String) srcLevelValue.getSelectedItem();
            SpecificationVersion jdk5 = new SpecificationVersion("1.5"); // NOI18N
            if (new SpecificationVersion(oldLevel).compareTo(jdk5) < 0 && new SpecificationVersion(newLevel).compareTo(jdk5) >= 0) {
                EventQueue.invokeLater(new Runnable() { // wait for combo to close, at least
                    public void run() {
                        if (!ApisupportAntUIUtils.showAcceptCancelDialog(
                                getMessage("CustomizerSources.title.enable_lint"),
                                getMessage("CustomizerSources.text.enable_lint"),
                                getMessage("CustomizerSources.button.enable_lint"),
                                getMessage("CustomizerSources.button.skip_lint"),
                                NotifyDescriptor.QUESTION_MESSAGE)) {
                            return;
                        }
                        String options = getProperty(SingleModuleProperties.JAVAC_COMPILERARGS);
                        String added = "-Xlint -Xlint:-serial"; // NOI18N
                        if (options == null || options.length() == 0) {
                            options = added;
                        } else {
                            options = options + " " + added; // NOI18N
                        }
                        setProperty(SingleModuleProperties.JAVAC_COMPILERARGS, options);
                    }
                });
            }
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:CustomizerSources.java

示例14: createJavadoc

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
@ProjectCustomizer.CompositeCategoryProvider.Registration(
    projectType="org-netbeans-modules-java-j2seproject",
    category="BuildCategory",
    position=300
)
public static J2SECompositePanelProvider createJavadoc() {
    return new J2SECompositePanelProvider(JAVADOC);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:J2SECompositePanelProvider.java

示例15: createComponent

import org.netbeans.spi.project.ui.support.ProjectCustomizer; //导入依赖的package包/类
public JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {
    SingleModuleProperties props = context.lookup(SingleModuleProperties.class);
    assert props != null;
    Project p = props.getProject();
    if (!(p instanceof NbModuleProject)) {
        return new JPanel(); // broken project?
    }
    return new CustomizerLibraries(props, category, (NbModuleProject) p);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CustomizerLibrariesFactory.java


注:本文中的org.netbeans.spi.project.ui.support.ProjectCustomizer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。