Program: 102360
Project: 102360
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 */
@SuppressWarnings("String_Node_Str") @Override public void createPartControl(final Composite parent){
  final GC gc=new GC(parent);
  gc.setFont(parent.getFont());
  final int height=Dialog.convertHeightInCharsToPixels(gc.getFontMetrics(),4);
  gc.dispose();
  final ScrolledComposite scroller=new ScrolledComposite(parent,SWT.V_SCROLL | SWT.H_SCROLL);
  scroller.setLayout(new GridLayout());
  scroller.setExpandHorizontal(true);
  scroller.setExpandVertical(true);
  ScrollBar bar=scroller.getHorizontalBar();
  if (bar != null)   bar.setIncrement(height / 4);
  bar=scroller.getVerticalBar();
  if (bar != null)   bar.setIncrement(height / 4);
  final Composite pg=WidgetFactory.createPanel(scroller,SWT.NONE,GridData.FILL_BOTH,1,1);
  scroller.setContent(pg);
  final Group group=WidgetFactory.createGroup(pg,DESCRIPTION_GROUP,GridData.FILL_HORIZONTAL);
  this.textEditor=new StyledTextEditor(group,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.WRAP);
  final GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.horizontalSpan=1;
  gridData.heightHint=height;
  gridData.minimumHeight=height;
  this.textEditor.setLayoutData(gridData);
  this.textEditor.setText(vdb.getDescription());
  this.textEditor.getDocument().addDocumentListener(new IDocumentListener(){
    public void documentAboutToBeChanged(    final DocumentEvent event){
    }
    public void documentChanged(    final DocumentEvent event){
      vdb.setDescription(textEditor.getText());
    }
  }
);
  final TextColumnProvider pathColumnProvider=new TextColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return PATH_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getName().removeLastSegments(1).toString();
    }
  }
;
  final CheckBoxColumnProvider syncColumnProvider=new CheckBoxColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return SYNCHRONIZED_COLUMN_NAME;
    }
    @Override public String getToolTip(    final VdbEntry element){
      if (element.getSynchronization() == Synchronization.Synchronized)       return SYNCHRONIZED_TOOLTIP;
      if (element.getSynchronization() == Synchronization.NotSynchronized)       return UNSYNCHRONIZED_TOOLTIP;
      return SYNCHRONIZATION_NOT_APPLICABLE_TOOLTIP;
    }
    @Override public Boolean getValue(    final VdbEntry element){
      return element.getSynchronization() == Synchronization.Synchronized;
    }
    @Override public boolean isEditable(    final VdbEntry element){
      return element.getSynchronization() == Synchronization.NotSynchronized;
    }
    @Override public void setValue(    final VdbEntry element,    final Boolean value){
      if (ConfirmationDialog.confirm(CONFIRM_SYNCHRONIZE_MESSAGE))       element.synchronize(new NullProgressMonitor());
    }
  }
;
  final TextColumnProvider descriptionColumnProvider=new TextColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return DESCRIPTION_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getDescription();
    }
    @Override public boolean isEditable(    final VdbEntry element){
      return true;
    }
    @Override public void setValue(    final VdbEntry element,    final String value){
      element.setDescription(value);
    }
  }
;
  modelsGroup=new TableAndButtonsGroup(pg,MODELS_GROUP,new DefaultTableProvider<VdbModelEntry>(){
    @Override public void doubleClicked(    final VdbModelEntry element){
      openEditor(element);
    }
    @Override public VdbModelEntry[] getElements(){
      final Set<VdbModelEntry> modelEntries=vdb.getModelEntries();
      return modelEntries.toArray(new VdbModelEntry[modelEntries.size()]);
    }
    @Override public boolean isDoubleClickSupported(){
      return true;
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public Image getImage(    final VdbModelEntry element){
      return ModelIdentifier.getModelImage(element.findFileInWorkspace());
    }
    @Override public String getName(){
      return MODEL_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      return element.getName().lastSegment();
    }
  }
,pathColumnProvider,syncColumnProvider,new CheckBoxColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return VISIBLE_COLUMN_NAME;
    }
    @Override public String getToolTip(    final VdbModelEntry element){
      return element.isVisible() ? VISIBLE_TOOLTIP : NOT_VISIBLE_TOOLTIP;
    }
    @Override public Boolean getValue(    final VdbModelEntry element){
      return element.isVisible();
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final Boolean value){
      element.setVisible(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return SOURCE_NAME_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getSourceName();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setSourceName(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return TRANSLATOR_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getTranslator();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setTranslator(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return JNDI_NAME_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getJndiName();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setJndiName(value);
    }
  }
,descriptionColumnProvider);
  final ModelLabelProvider modelLabelProvider=new ModelLabelProvider();
  final ISelectionStatusValidator validator=new ISelectionStatusValidator(){
    public IStatus validate(    final Object[] selection){
      for (int ndx=selection.length; --ndx >= 0; )       if (selection[ndx] instanceof IContainer)       return new Status(IStatus.ERROR,VdbUiConstants.PLUGIN_ID,0,ADD_FILE_DIALOG_INVALID_SELECTION_MESSAGE,null);
      return new Status(IStatus.OK,VdbUiConstants.PLUGIN_ID,0,EMPTY_STRING,null);
    }
  }
;
  modelsGroup.add(modelsGroup.new AddButtonProvider(){
    @Override protected void add(){
      final ViewerFilter filter=new ViewerFilter(){
        @Override public boolean select(        final Viewer viewer,        final Object parent,        final Object element){
          if (element instanceof IContainer)           return true;
          final IFile file=(IFile)element;
          if (!ModelUtilities.isModelFile(file) && !ModelUtil.isXsdFile(file))           return false;
          for (          final VdbModelEntry modelEntry : vdb.getModelEntries())           if (file.equals(modelEntry.findFileInWorkspace()))           return false;
          return true;
        }
      }
;
      final Object[] models=WidgetUtil.showWorkspaceObjectSelectionDialog(ADD_FILE_DIALOG_TITLE,ADD_FILE_DIALOG_MESSAGE,true,null,new ModelingResourceFilter(filter),validator,modelLabelProvider);
      for (      final Object model : models)       vdb.addModelEntry(((IFile)model).getFullPath(),new NullProgressMonitor());
    }
  }
);
  final RemoveButtonProvider removeButtonProvider=modelsGroup.new RemoveButtonProvider(){
    @Override public void selected(    final IStructuredSelection selection){
      if (!ConfirmationDialog.confirm(CONFIRM_REMOVE_MESSAGE))       return;
      final Set<VdbEntry> entries=new HashSet<VdbEntry>();
      final Set<VdbModelEntry> importedBy=new HashSet<VdbModelEntry>();
      for (      final Object element : selection.toList()) {
        entries.add((VdbEntry)element);
        if (element instanceof VdbModelEntry)         importedBy.addAll(((VdbModelEntry)element).getImportedBy());
      }
      if (!importedBy.isEmpty())       importedBy.removeAll(entries);
      if (!importedBy.isEmpty()) {
        if (!ConfirmationDialog.confirm(new ConfirmationDialog(CONFIRM_REMOVE_IMPORTED_BY_MESSAGE){
          @Override protected Control createCustomArea(          final Composite parent){
            final ListViewer viewer=new ListViewer(parent);
            viewer.setContentProvider(new DefaultContentProvider());
            viewer.setLabelProvider(new LabelProvider(){
              @Override public String getText(              final Object element){
                return ((VdbEntry)element).getName().toString();
              }
            }
);
            viewer.getList().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
            viewer.setInput(importedBy);
            return viewer.getControl();
          }
        }
))         return;
        entries.addAll(importedBy);
      }
      for (      final VdbEntry entry : entries)       vdb.removeEntry(entry);
    }
  }
;
  modelsGroup.add(removeButtonProvider);
  final TableViewer viewer=modelsGroup.getTable().getViewer();
  final MenuManager menuManager=new MenuManager();
  viewer.getControl().setMenu(menuManager.createContextMenu(pg));
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    final SelectionChangedEvent event){
      menuManager.removeAll();
      final Object[] actions=SourceHandlerExtensionManager.findApplicableActions(viewer.getSelection());
      if (actions != null)       for (      final Object action : actions) {
        if (action instanceof IAction)         menuManager.add((IAction)action);
      }
    }
  }
);
  modelsGroup.setInput(vdb);
  final WorkbenchLabelProvider workbenchLabelProvider=new WorkbenchLabelProvider();
  otherFilesGroup=new TableAndButtonsGroup(pg,OTHER_FILES_GROUP,new DefaultTableProvider<VdbEntry>(){
    @Override public VdbEntry[] getElements(){
      final Set<VdbEntry> entries=vdb.getEntries();
      return entries.toArray(new VdbEntry[entries.size()]);
    }
  }
,new TextColumnProvider<VdbEntry>(){
    @Override public Image getImage(    final VdbEntry element){
      return workbenchLabelProvider.getImage(element.findFileInWorkspace());
    }
    @Override public String getName(){
      return FILE_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getName().lastSegment();
    }
  }
,pathColumnProvider,syncColumnProvider,descriptionColumnProvider);
  otherFilesGroup.add(otherFilesGroup.new AddButtonProvider(){
    @Override protected void add(){
      final ViewerFilter filter=new ViewerFilter(){
        @Override public boolean select(        final Viewer viewer,        final Object parent,        final Object element){
          if (element instanceof IContainer)           return true;
          final IFile file=(IFile)element;
          if (ModelUtilities.isModelFile(file) || ModelUtil.isXsdFile(file) || ModelUtil.isVdbArchiveFile(file))           return false;
          for (          final VdbEntry entry : vdb.getEntries())           if (file.equals(entry.findFileInWorkspace()))           return false;
          return true;
        }
      }
;
      final Object[] files=WidgetUtil.showWorkspaceObjectSelectionDialog(ADD_FILE_DIALOG_TITLE,ADD_FILE_DIALOG_MESSAGE,true,null,new ModelingResourceFilter(filter),validator,modelLabelProvider);
      for (      final Object file : files)       vdb.addEntry(((IFile)file).getFullPath(),new NullProgressMonitor());
    }
  }
);
  otherFilesGroup.add(removeButtonProvider);
  otherFilesGroup.setInput(vdb);
  synchronizeAllButton=WidgetFactory.createButton(pg,SYNCHRONIZE_ALL_BUTTON,GridData.HORIZONTAL_ALIGN_CENTER);
  synchronizeAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent event){
      if (!ConfirmationDialog.confirm(CONFIRM_SYNCHRONIZE_ALL_MESSAGE))       return;
      vdb.synchronize(new NullProgressMonitor());
      modelsGroup.getTable().getViewer().refresh();
      otherFilesGroup.getTable().getViewer().refresh();
    }
  }
);
  synchronizeAllButton.setEnabled(!vdb.isSynchronized());
  group.setFont(modelsGroup.getGroup().getFont());
  pg.pack(true);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 */
@SuppressWarnings("String_Node_Str") @Override public void createPartControl(final Composite parent){
  final GC gc=new GC(parent);
  gc.setFont(parent.getFont());
  final int height=Dialog.convertHeightInCharsToPixels(gc.getFontMetrics(),4);
  gc.dispose();
  final ScrolledComposite scroller=new ScrolledComposite(parent,SWT.V_SCROLL | SWT.H_SCROLL);
  scroller.setLayout(new GridLayout());
  scroller.setExpandHorizontal(true);
  scroller.setExpandVertical(true);
  ScrollBar bar=scroller.getHorizontalBar();
  if (bar != null)   bar.setIncrement(height / 4);
  bar=scroller.getVerticalBar();
  if (bar != null)   bar.setIncrement(height / 4);
  final Composite pg=WidgetFactory.createPanel(scroller,SWT.NONE,GridData.FILL_BOTH,1,1);
  scroller.setContent(pg);
  final Group group=WidgetFactory.createGroup(pg,DESCRIPTION_GROUP,GridData.FILL_HORIZONTAL);
  this.textEditor=new StyledTextEditor(group,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.WRAP);
  final GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.horizontalSpan=1;
  gridData.heightHint=height;
  gridData.minimumHeight=height;
  this.textEditor.setLayoutData(gridData);
  this.textEditor.setText(vdb.getDescription());
  this.textEditor.getDocument().addDocumentListener(new IDocumentListener(){
    public void documentAboutToBeChanged(    final DocumentEvent event){
    }
    public void documentChanged(    final DocumentEvent event){
      vdb.setDescription(textEditor.getText());
    }
  }
);
  final TextColumnProvider pathColumnProvider=new TextColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return PATH_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getName().removeLastSegments(1).toString();
    }
  }
;
  final CheckBoxColumnProvider syncColumnProvider=new CheckBoxColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return SYNCHRONIZED_COLUMN_NAME;
    }
    @Override public String getToolTip(    final VdbEntry element){
      if (element.getSynchronization() == Synchronization.Synchronized)       return SYNCHRONIZED_TOOLTIP;
      if (element.getSynchronization() == Synchronization.NotSynchronized)       return UNSYNCHRONIZED_TOOLTIP;
      return SYNCHRONIZATION_NOT_APPLICABLE_TOOLTIP;
    }
    @Override public Boolean getValue(    final VdbEntry element){
      return element.getSynchronization() == Synchronization.Synchronized;
    }
    @Override public boolean isEditable(    final VdbEntry element){
      return element.getSynchronization() == Synchronization.NotSynchronized;
    }
    @Override public void setValue(    final VdbEntry element,    final Boolean value){
      if (ConfirmationDialog.confirm(CONFIRM_SYNCHRONIZE_MESSAGE))       element.synchronize(new NullProgressMonitor());
    }
  }
;
  final TextColumnProvider descriptionColumnProvider=new TextColumnProvider<VdbEntry>(){
    @Override public String getName(){
      return DESCRIPTION_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getDescription();
    }
    @Override public boolean isEditable(    final VdbEntry element){
      return true;
    }
    @Override public void setValue(    final VdbEntry element,    final String value){
      element.setDescription(value);
    }
  }
;
  modelsGroup=new TableAndButtonsGroup(pg,MODELS_GROUP,new DefaultTableProvider<VdbModelEntry>(){
    @Override public void doubleClicked(    final VdbModelEntry element){
      openEditor(element);
    }
    @Override public VdbModelEntry[] getElements(){
      final Set<VdbModelEntry> modelEntries=vdb.getModelEntries();
      return modelEntries.toArray(new VdbModelEntry[modelEntries.size()]);
    }
    @Override public boolean isDoubleClickSupported(){
      return true;
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public Image getImage(    final VdbModelEntry element){
      return ModelIdentifier.getModelImage(element.findFileInWorkspace());
    }
    @Override public String getName(){
      return MODEL_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      return element.getName().lastSegment();
    }
  }
,pathColumnProvider,syncColumnProvider,new CheckBoxColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return VISIBLE_COLUMN_NAME;
    }
    @Override public String getToolTip(    final VdbModelEntry element){
      return element.isVisible() ? VISIBLE_TOOLTIP : NOT_VISIBLE_TOOLTIP;
    }
    @Override public Boolean getValue(    final VdbModelEntry element){
      return element.isVisible();
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final Boolean value){
      element.setVisible(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return SOURCE_NAME_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getSourceName();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setSourceName(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return TRANSLATOR_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getTranslator();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setTranslator(value);
    }
  }
,new TextColumnProvider<VdbModelEntry>(){
    @Override public String getName(){
      return JNDI_NAME_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbModelEntry element){
      final String value=element.getJndiName();
      return value == null ? EMPTY_STRING : value;
    }
    @Override public boolean isEditable(    final VdbModelEntry element){
      return true;
    }
    @Override public void setValue(    final VdbModelEntry element,    final String value){
      element.setJndiName(value);
    }
  }
,descriptionColumnProvider);
  final ModelLabelProvider modelLabelProvider=new ModelLabelProvider();
  final ISelectionStatusValidator validator=new ISelectionStatusValidator(){
    public IStatus validate(    final Object[] selection){
      for (int ndx=selection.length; --ndx >= 0; )       if (selection[ndx] instanceof IContainer)       return new Status(IStatus.ERROR,VdbUiConstants.PLUGIN_ID,0,ADD_FILE_DIALOG_INVALID_SELECTION_MESSAGE,null);
      return new Status(IStatus.OK,VdbUiConstants.PLUGIN_ID,0,EMPTY_STRING,null);
    }
  }
;
  modelsGroup.add(modelsGroup.new AddButtonProvider(){
    @Override protected void add(){
      final ViewerFilter filter=new ViewerFilter(){
        @Override public boolean select(        final Viewer viewer,        final Object parent,        final Object element){
          if (element instanceof IContainer)           return true;
          final IFile file=(IFile)element;
          if (!ModelUtilities.isModelFile(file) && !ModelUtil.isXsdFile(file))           return false;
          for (          final VdbModelEntry modelEntry : vdb.getModelEntries())           if (file.equals(modelEntry.findFileInWorkspace()))           return false;
          return true;
        }
      }
;
      ModelingResourceFilter wsFilter=new ModelingResourceFilter(filter);
      wsFilter.setShowHiddenProjects(true);
      final Object[] models=WidgetUtil.showWorkspaceObjectSelectionDialog(ADD_FILE_DIALOG_TITLE,ADD_FILE_DIALOG_MESSAGE,true,null,wsFilter,validator,modelLabelProvider);
      for (      final Object model : models)       vdb.addModelEntry(((IFile)model).getFullPath(),new NullProgressMonitor());
    }
  }
);
  final RemoveButtonProvider removeButtonProvider=modelsGroup.new RemoveButtonProvider(){
    @Override public void selected(    final IStructuredSelection selection){
      if (!ConfirmationDialog.confirm(CONFIRM_REMOVE_MESSAGE))       return;
      final Set<VdbEntry> entries=new HashSet<VdbEntry>();
      final Set<VdbModelEntry> importedBy=new HashSet<VdbModelEntry>();
      for (      final Object element : selection.toList()) {
        entries.add((VdbEntry)element);
        if (element instanceof VdbModelEntry)         importedBy.addAll(((VdbModelEntry)element).getImportedBy());
      }
      if (!importedBy.isEmpty())       importedBy.removeAll(entries);
      if (!importedBy.isEmpty()) {
        if (!ConfirmationDialog.confirm(new ConfirmationDialog(CONFIRM_REMOVE_IMPORTED_BY_MESSAGE){
          @Override protected Control createCustomArea(          final Composite parent){
            final ListViewer viewer=new ListViewer(parent);
            viewer.setContentProvider(new DefaultContentProvider());
            viewer.setLabelProvider(new LabelProvider(){
              @Override public String getText(              final Object element){
                return ((VdbEntry)element).getName().toString();
              }
            }
);
            viewer.getList().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
            viewer.setInput(importedBy);
            return viewer.getControl();
          }
        }
))         return;
        entries.addAll(importedBy);
      }
      for (      final VdbEntry entry : entries)       vdb.removeEntry(entry);
    }
  }
;
  modelsGroup.add(removeButtonProvider);
  final TableViewer viewer=modelsGroup.getTable().getViewer();
  final MenuManager menuManager=new MenuManager();
  viewer.getControl().setMenu(menuManager.createContextMenu(pg));
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    final SelectionChangedEvent event){
      menuManager.removeAll();
      final Object[] actions=SourceHandlerExtensionManager.findApplicableActions(viewer.getSelection());
      if (actions != null)       for (      final Object action : actions) {
        if (action instanceof IAction)         menuManager.add((IAction)action);
      }
    }
  }
);
  modelsGroup.setInput(vdb);
  final WorkbenchLabelProvider workbenchLabelProvider=new WorkbenchLabelProvider();
  otherFilesGroup=new TableAndButtonsGroup(pg,OTHER_FILES_GROUP,new DefaultTableProvider<VdbEntry>(){
    @Override public VdbEntry[] getElements(){
      final Set<VdbEntry> entries=vdb.getEntries();
      return entries.toArray(new VdbEntry[entries.size()]);
    }
  }
,new TextColumnProvider<VdbEntry>(){
    @Override public Image getImage(    final VdbEntry element){
      return workbenchLabelProvider.getImage(element.findFileInWorkspace());
    }
    @Override public String getName(){
      return FILE_COLUMN_NAME;
    }
    @Override public String getValue(    final VdbEntry element){
      return element.getName().lastSegment();
    }
  }
,pathColumnProvider,syncColumnProvider,descriptionColumnProvider);
  otherFilesGroup.add(otherFilesGroup.new AddButtonProvider(){
    @Override protected void add(){
      final ViewerFilter filter=new ViewerFilter(){
        @Override public boolean select(        final Viewer viewer,        final Object parent,        final Object element){
          if (element instanceof IContainer)           return true;
          final IFile file=(IFile)element;
          if (ModelUtilities.isModelFile(file) || ModelUtil.isXsdFile(file) || ModelUtil.isVdbArchiveFile(file))           return false;
          for (          final VdbEntry entry : vdb.getEntries())           if (file.equals(entry.findFileInWorkspace()))           return false;
          return true;
        }
      }
;
      final Object[] files=WidgetUtil.showWorkspaceObjectSelectionDialog(ADD_FILE_DIALOG_TITLE,ADD_FILE_DIALOG_MESSAGE,true,null,new ModelingResourceFilter(filter),validator,modelLabelProvider);
      for (      final Object file : files)       vdb.addEntry(((IFile)file).getFullPath(),new NullProgressMonitor());
    }
  }
);
  otherFilesGroup.add(removeButtonProvider);
  otherFilesGroup.setInput(vdb);
  synchronizeAllButton=WidgetFactory.createButton(pg,SYNCHRONIZE_ALL_BUTTON,GridData.HORIZONTAL_ALIGN_CENTER);
  synchronizeAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent event){
      if (!ConfirmationDialog.confirm(CONFIRM_SYNCHRONIZE_ALL_MESSAGE))       return;
      vdb.synchronize(new NullProgressMonitor());
      modelsGroup.getTable().getViewer().refresh();
      otherFilesGroup.getTable().getViewer().refresh();
    }
  }
);
  synchronizeAllButton.setEnabled(!vdb.isSynchronized());
  group.setFont(modelsGroup.getGroup().getFont());
  pg.pack(true);
}