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


Java ModelHandle2.Configuration方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: checkButtonEnablement

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
private void checkButtonEnablement() {
    ModelHandle2.Configuration conf = (ModelHandle2.Configuration) lstConfigurations.getSelectedValue();
    if (conf == null || conf.isProfileBased() || conf.isDefault()) {
        btnEdit.setEnabled(false);
        btnRemove.setEnabled(false);
    } else {
        btnEdit.setEnabled(true);
        btnRemove.setEnabled(true);
    }
    btnClone.setEnabled(conf != null);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ConfigurationsPanel.java

示例5: createListModel

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
private void createListModel() {
//        boolean isProfile = false;
        DefaultListModel model = new DefaultListModel();
        if (handle.getConfigurations() != null) {
            for (ModelHandle2.Configuration hndl : handle.getConfigurations()) {
                model.addElement(hndl);
//                if (hndl.isProfileBased()) {
//                    isProfile = true;
//                }
            }
        }
        lstConfigurations.setModel(model);
        lstConfigurations.setSelectedValue(handle.getActiveConfiguration(), true);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:ConfigurationsPanel.java

示例6: btnRemoveActionPerformed

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed
    ModelHandle2.Configuration conf = (ModelHandle2.Configuration) lstConfigurations.getSelectedValue();
    if (conf != null) {
        handle.removeConfiguration(conf);
        createListModel();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ConfigurationsPanel.java

示例7: btnActivateActionPerformed

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
private void btnActivateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActivateActionPerformed
    ModelHandle2.Configuration conf = (ModelHandle2.Configuration) lstConfigurations.getSelectedValue();
    if (conf != null) {
        handle.setActiveConfiguration(conf);
    }
    lstConfigurations.repaint();
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:ConfigurationsPanel.java

示例8: btnCloneActionPerformed

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
private void btnCloneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloneActionPerformed
ModelHandle2.Configuration conf = (ModelHandle2.Configuration) lstConfigurations.getSelectedValue();
if (conf != null) {
    NewConfigurationPanel pnl = new NewConfigurationPanel();
    pnl.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ConfigurationsPanel.class, "ACSD_Clone_Config"));
    pnl.setConfigurationId(conf.getId() + "_clone");
    pnl.setProfiles(conf.getActivatedProfiles());
    pnl.setProperties(ActionMappings.createPropertiesList(conf.getProperties()));
    pnl.setShared(conf.isShared());
    DialogDescriptor dd = new DialogDescriptor(pnl, NbBundle.getMessage(ConfigurationsPanel.class, "TIT_Clone_Config"));
    Object ret = DialogDisplayer.getDefault().notify(dd);
    if (ret == DialogDescriptor.OK_OPTION) {
        ModelHandle2.Configuration newconf = ModelHandle2.createCustomConfiguration(pnl.getConfigurationId());

        newconf.setShared(pnl.isShared());
        newconf.setActivatedProfiles(pnl.getProfiles());
        newconf.setProperties(ActionMappings.convertStringToActionProperties(pnl.getProperties()));
        handle.addConfiguration(newconf);
        ActionToGoalMapping oldmapping = handle.getActionMappings(conf);
        ActionToGoalMapping newmapping = handle.getActionMappings(newconf);
        cloneMappings(oldmapping, newmapping);
        handle.markAsModified(newmapping);
        handle.markConfigurationsAsModified();
        createListModel();
        lstConfigurations.setSelectedValue(newconf, true);
    }
}
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:ConfigurationsPanel.java

示例9: setupConfigurations

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

示例10: createHandle

import org.netbeans.modules.maven.api.customizer.ModelHandle2; //导入方法依赖的package包/类
public abstract ModelHandle2 createHandle(POMModel model, MavenProject proj, Map<String, ActionToGoalMapping> mapp,
List<ModelHandle2.Configuration> configs, ModelHandle2.Configuration active, MavenProjectPropsImpl auxProps);
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:CustomizerProviderImpl.java


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