Skip to content

Commit

Permalink
TEIIDDES-2314 added checks to prevent new VDB with vdb source model a…
Browse files Browse the repository at this point in the history
…nd adding same to existing VDB.
  • Loading branch information
blafond committed Aug 26, 2014
1 parent 26e0de5 commit 479c2d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public final class VdbEditor extends EditorPart implements IResourceChangeListen
static final String VISIBLE_TOOLTIP = i18n("visibleTooltip"); //$NON-NLS-1$
static final String NOT_VISIBLE_TOOLTIP = i18n("notVisibleTooltip"); //$NON-NLS-1$

static final String ADD_MODEL_DIALOG_TITLE = i18n("addModelDialogTitle"); //$NON-NLS-1$
static final String ADD_MODEL_DIALOG_MESSAGE = i18n("addModelDialogMessage"); //$NON-NLS-1$
static final String ADD_FILE_DIALOG_TITLE = i18n("addFileDialogTitle"); //$NON-NLS-1$
static final String ADD_FILE_DIALOG_MESSAGE = i18n("addFileDialogMessage"); //$NON-NLS-1$
static final String ADD_FILE_DIALOG_INVALID_SELECTION_MESSAGE = i18n("addFileDialogInvalidSelectionMessage"); //$NON-NLS-1$
Expand Down Expand Up @@ -2072,7 +2074,7 @@ public boolean select( final Viewer viewer,
return false;
}
final IFile file = (IFile)element;
if (!ModelUtilities.isModelFile(file)) {
if (!ModelUtilities.isModelFile(file) || ModelUtilities.isVdbSourceModel(file)) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.

addModeleDialogTitle = Add Model(s) to VDB
addModelDialogMessage = Select one or more models to add to the VDB.
addFileDialogTitle = Add File(s) to VDB
addFileDialogMessage = Select one or more files to add to the VDB.
addFileDialogInvalidSelectionMessage = Only files (not folders) may be selected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ boolean isAllModelsSelected( ISelection theSelection ) {
for (@SuppressWarnings("rawtypes")
Iterator iter = selectedObjects.iterator(); iter.hasNext();) {
IResource res = (IResource)iter.next();
if (!ModelUtilities.isModelFile(res)) {
if (!ModelUtilities.isModelFile(res) || ModelUtilities.isVdbSourceModel((IFile)res)) {
result = false;
break;
}
Expand Down

0 comments on commit 479c2d1

Please sign in to comment.