Author: scabanovich
Date: 2008-03-28 08:18:57 -0400 (Fri, 28 Mar 2008)
New Revision: 7179
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropCommand.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropWizardModel.java
Log:
JBIDE-1957
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropCommand.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropCommand.java 2008-03-28
12:18:01 UTC (rev 7178)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropCommand.java 2008-03-28
12:18:57 UTC (rev 7179)
@@ -183,6 +183,11 @@
callPaletteWizard = PaletteInsertManager.getInstance().getWizardName(properties) !=
null;
+ boolean isWizardEnabled =
(!"FileJAVA".equals(target.getModelEntity().getName()));
+ if(getDefaultModel() instanceof PaletteDropWizardModel) {
+ ((PaletteDropWizardModel)getDefaultModel()).setWizardEnabled(isWizardEnabled);
+ }
+
if(uri == null || tagname == null) {
getDefaultModel().setTagProposal(IDropWizardModel.UNDEFINED_TAG_PROPOSAL);
} else {
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropWizardModel.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropWizardModel.java 2008-03-28
12:18:01 UTC (rev 7178)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/PaletteDropWizardModel.java 2008-03-28
12:18:57 UTC (rev 7179)
@@ -11,8 +11,18 @@
package org.jboss.tools.common.model.ui.editors.dnd;
public class PaletteDropWizardModel extends ExternalDropWizardModel implements
IDropWizardModel {
+ boolean isWizardEnabled = true;
+
public PaletteDropWizardModel(ITagProposalFactory tagProposalFactory) {
super(tagProposalFactory);
}
+ public void setWizardEnabled(boolean b) {
+ isWizardEnabled = b;
+ }
+
+ public boolean isWizardRequired() {
+ return isWizardEnabled && super.isWizardRequired();
+ }
+
}
Show replies by date