"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/project/PrefPageProjectResourceSettings.java" between
dbeaver-6.1.5.tar.gz and dbeaver-6.2.0.tar.gz

About: DBeaver is a multi-platform database tool (for developers and database administrators) that supports all popular databases. Java sources.

PrefPageProjectResourceSettings.java  (dbeaver-6.1.5):PrefPageProjectResourceSettings.java  (dbeaver-6.2.0)
skipping to change at line 206 skipping to change at line 206
private DBPProject getProjectMeta() { private DBPProject getProjectMeta() {
return DBWorkbench.getPlatform().getWorkspace().getProject(this.project) ; return DBWorkbench.getPlatform().getWorkspace().getProject(this.project) ;
} }
@Override @Override
public boolean performOk() { public boolean performOk() {
java.util.List<IResource> refreshedResources = new ArrayList<>(); java.util.List<IResource> refreshedResources = new ArrayList<>();
// Save roots // Save roots
DBPProject projectMeta = getProjectMeta(); DBPProject projectMeta = getProjectMeta();
for (TableItem item : resourceTable.getItems()) { if (projectMeta != null) {
DBPResourceHandlerDescriptor descriptor = (DBPResourceHandlerDescrip for (TableItem item : resourceTable.getItems()) {
tor) item.getData(); DBPResourceHandlerDescriptor descriptor = (DBPResourceHandlerDes
String rootPath = item.getText(1); criptor) item.getData();
if (!CommonUtils.equalObjects(descriptor.getDefaultRoot(projectMeta) String rootPath = item.getText(1);
, rootPath)) { if (!CommonUtils.equalObjects(descriptor.getDefaultRoot(projectM
IResource oldResource = project.findMember(descriptor.getDefault eta), rootPath)) {
Root(projectMeta)); IResource oldResource = project.findMember(descriptor.getDef
if (oldResource != null) { aultRoot(projectMeta));
refreshedResources.add(oldResource); if (oldResource != null) {
} refreshedResources.add(oldResource);
}
IResource newResource = project.findMember(rootPath); IResource newResource = project.findMember(rootPath);
if (newResource != null) { if (newResource != null) {
refreshedResources.add(newResource); refreshedResources.add(newResource);
}
descriptor.setDefaultRoot(projectMeta, rootPath);
} }
descriptor.setDefaultRoot(projectMeta, rootPath);
} }
} if (!refreshedResources.isEmpty()) {
if (!refreshedResources.isEmpty()) { for (IResource resource : refreshedResources) {
for (IResource resource : refreshedResources) { DBNUtils.refreshNavigatorResource(resource, this);
DBNUtils.refreshNavigatorResource(resource, this); }
} }
} }
return super.performOk(); return super.performOk();
} }
@Override @Override
public IAdaptable getElement() { public IAdaptable getElement() {
return project; return project;
} }
 End of changes. 4 change blocks. 
19 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)