Skip to content

Commit

Permalink
TEIIDDES-1207 added check to prevent adding to menu if Virtual model
Browse files Browse the repository at this point in the history
  • Loading branch information
blafond committed Sep 18, 2012
1 parent dbe4053 commit e758028
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import org.teiid.designer.ui.common.util.WidgetFactory;
import org.teiid.designer.ui.editors.ModelEditor;
import org.teiid.designer.ui.editors.ModelEditorManager;
import org.teiid.designer.ui.viewsupport.ModelIdentifier;
import org.teiid.designer.ui.viewsupport.ModelUtilities;
import org.teiid.designer.ui.viewsupport.RelationalObjectFactory;

Expand Down Expand Up @@ -264,8 +265,10 @@ public boolean isApplicable(ISelection selection) {
}

if (assistant.supportsMedOperation(MedOperations.ADD_MED_TO_MODEL, obj)) {
this.selectedModel = (IFile) obj;
result = true;
if( ModelIdentifier.isRelationalSourceModel( (IFile) obj)) {
this.selectedModel = (IFile) obj;
result = true;
}
}
}

Expand Down

0 comments on commit e758028

Please sign in to comment.