本文整理匯總了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);