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


Java ModelHandle2类代码示例

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


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

示例1: CompilePanel

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
/** Creates new form CompilePanel */
public CompilePanel(ModelHandle2 handle, Project prj) {
    initComponents();
    this.handle = handle;
    project = prj;
    comJavaPlatform.setModel(new PlatformsModel());
    comJavaPlatform.setRenderer(new PlatformsRenderer());

    origComPlatformFore = comJavaPlatform.getForeground();
    btnLearnMore.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    btnLearnMore.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            try {
                HtmlBrowser.URLDisplayer.getDefault().showURL(new URL("http://wiki.netbeans.org/FaqCompileOnSave#Using_Compile_on_Save_in_Maven_Projects"));
            } catch (MalformedURLException ex) {
                Exceptions.printStackTrace(ex);
            }
        }
    });
    initValues();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:CompilePanel.java

示例2: btnAddActionPerformed

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
    NewConfigurationPanel pnl = new NewConfigurationPanel();
    pnl.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ConfigurationsPanel.class, "ACSD_Add_Config"));
    DialogDescriptor dd = new DialogDescriptor(pnl, NbBundle.getMessage(ConfigurationsPanel.class, "TIT_Add_Config"));
    pnl.attachDescriptor(dd);
    Object ret = DialogDisplayer.getDefault().notify(dd);
    if (ret == DialogDescriptor.OK_OPTION) {
        ModelHandle2.Configuration conf = ModelHandle2.createCustomConfiguration(pnl.getConfigurationId());
        conf.setShared(pnl.isShared());
        conf.setActivatedProfiles(pnl.getProfiles());
        conf.setProperties(ActionMappings.convertStringToActionProperties(pnl.getProperties()));
        handle.addConfiguration(conf);
        handle.markConfigurationsAsModified();
        createListModel();
        lstConfigurations.setSelectedValue(conf, true);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:ConfigurationsPanel.java

示例3: btnEditActionPerformed

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
    ModelHandle2.Configuration conf = (ModelHandle2.Configuration) lstConfigurations.getSelectedValue();
    if (conf != null) {
        NewConfigurationPanel pnl = new NewConfigurationPanel();
        pnl.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ConfigurationsPanel.class, "ACSD_Edit_Config"));
        pnl.setConfigurationId(conf.getId());
        pnl.setProfiles(conf.getActivatedProfiles());
        pnl.setProperties(ActionMappings.createPropertiesList(conf.getProperties()));
        pnl.setShared(conf.isShared());
        DialogDescriptor dd = new DialogDescriptor(pnl, NbBundle.getMessage(ConfigurationsPanel.class, "TIT_Edit_Config"));
        Object ret = DialogDisplayer.getDefault().notify(dd);
        if (ret == DialogDescriptor.OK_OPTION) {
            conf.setShared(pnl.isShared());
            conf.setActivatedProfiles(pnl.getProfiles());
            conf.setProperties(ActionMappings.convertStringToActionProperties(pnl.getProperties()));
            handle.markConfigurationsAsModified();
            createListModel();
            lstConfigurations.setSelectedValue(conf, true);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:ConfigurationsPanel.java

示例4: assertArgs

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
private void assertArgs(String argsString, String propString, AssertArgs a) throws IOException {
    FileObject pom = TestFileUtils.writeFile(FileUtil.toFileObject(getWorkDir()), "pom.xml", "<project xmlns='http://maven.apache.org/POM/4.0.0'>\n"
            + "    <modelVersion>4.0.0</modelVersion>\n"
            + "    <groupId>grp</groupId>\n"
            + "    <artifactId>art</artifactId>\n"
            + "    <version>1.0</version>\n"
            +      propString
            + "    <build>\n"
            + "        <plugins>\n"
            + "            <plugin>\n"
            + "                <groupId>org.codehaus.mojo</groupId>\n"
            + "                <artifactId>exec-maven-plugin</artifactId>\n"
            + "                <version>1.4.0</version>\n"
            + "                <configuration>\n"
            + "                    <executable>${java.home}/bin/java</executable>\n"
            +                      argsString 
            + "                </configuration>\n"
            + "            </plugin>\n"      
            + "        </plugins>\n"
            + "    </build>\n"
            + "</project>\n");
    
    Project project = ProjectManager.getDefault().findProject(pom.getParent());        
    NetbeansActionMapping mapp = ModelHandle2.getMapping("run", project, project.getLookup().lookup(M2ConfigProvider.class).getActiveConfiguration());
    a.assertArgs(ModelRunConfig.getExecArgsByPom(mapp, project));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:ModelRunConfigTest.java

示例5: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的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

示例6: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Packages=Public Packages")
public Category createCategory(Lookup context) {
    Project project = context.lookup(Project.class);
    NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
    if (NbMavenProject.TYPE_NBM.equalsIgnoreCase(watcher.getPackagingType())) {
        return ProjectCustomizer.Category.create(
                ModelHandle2.PANEL_COMPILE,
                TIT_Packages(),
                null);
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:PackagesPanelProvider.java

示例7: InstallerPanel

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@SuppressWarnings("ResultOfObjectAllocationIgnored")
private InstallerPanel(ProjectCustomizer.Category category, Project project, ModelHandle2 handle) {
    this.category = category;
    this.project = project;
    this.handle = handle;
    initComponents();
    new BooleanPropUpdater(PROP_WINDOWS, true, windowsCheckBox);
    new BooleanPropUpdater(PROP_SOLARIS, true, solarisCheckBox);
    new BooleanPropUpdater(PROP_LINUX, true, linuxCheckBox);
    new BooleanPropUpdater(PROP_MAC, true, macCheckBox);
    new StringPropUpdater(PROP_LICENSE, licenseField, licenseLabel);
    new BooleanPropUpdater(PROP_PACK200, true, pack200CheckBox);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:InstallerPanel.java

示例8: PublicPackagesPanel

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
/** Creates new form PublicPackagesPanel */
public PublicPackagesPanel(ModelHandle2 handle, Project prj) {
    this.handle = handle;
    this.project = prj;
    tableModel = new SelectedItemsTableModel(this);

    initComponents();

    jScrollPane1.getViewport().setBackground(exportTable.getBackground());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:PublicPackagesPanel.java

示例9: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Compile=Compile")
public Category createCategory(Lookup context) {
    return ProjectCustomizer.Category.create(
            ModelHandle2.PANEL_COMPILE,
            TIT_Compile(),
            null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CompilePanelProvider.java

示例10: setupConfigurations

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
private void setupConfigurations() {
    lblConfiguration.setVisible(true);
    comConfiguration.setVisible(true);
    DefaultComboBoxModel comModel = new DefaultComboBoxModel();
    for (ModelHandle2.Configuration conf : handle.getConfigurations()) {
        comModel.addElement(conf);
    }
    comConfiguration.setModel(comModel);
    comConfiguration.setSelectedItem(handle.getActiveConfiguration());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:RunJarPanel.java

示例11: getCompilerParam

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
String getCompilerParam(ModelHandle2 handle, String param) {
    CompilerParamOperation oper = operations.get(param);
    if (oper != null) {
        return oper.getValue();
            }

    String value = PluginPropertyUtils.getPluginProperty(handle.getProject(),
            Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_COMPILER, param,
            "compile"); //NOI18N
    if (value != null) {
        return value;
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:CompilePanel.java

示例12: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Action_Mappings=Actions")
public Category createCategory(Lookup context) {
    return ProjectCustomizer.Category.create(
            ModelHandle2.PANEL_MAPPING, 
            TIT_Action_Mappings(), 
            null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:ActionMappingsPanelProvider.java

示例13: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Basic=General")
public Category createCategory(Lookup context) {
    return ProjectCustomizer.Category.create(
            ModelHandle2.PANEL_BASIC, 
            TIT_Basic(), 
            null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:BasicPanelProvider.java

示例14: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Headers=License Headers")
public Category createCategory(Lookup context) {
    return ProjectCustomizer.Category.create(
            ModelHandle2.PANEL_HEADERS,
            TIT_Headers(),
            null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:LicenseHeaderPanelProvider.java

示例15: createCategory

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入依赖的package包/类
@Override
@Messages("TIT_Run=Run")
public Category createCategory(Lookup context) {
    NbMavenProjectImpl project = context.lookup(NbMavenProjectImpl.class);
    NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
    
    if (NbMavenProject.TYPE_JAR.equalsIgnoreCase(watcher.getPackagingType())) {
        return ProjectCustomizer.Category.create(
                ModelHandle2.PANEL_RUN,
                TIT_Run(),
                null);
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:RunJarPanelProvider.java


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