本文整理汇总了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);
}
}
示例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);
}
}
}
示例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());
}
示例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);
}
示例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);
}
示例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();
}
}
示例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();
}
示例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);
}
}
}
示例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());
}
示例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);