mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
2005-01-07 Alain Magloire
Fix PR 82202 * src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java * src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java * src/org/eclipse/cdt/internal/ui/util/Resources.java
This commit is contained in:
parent
e0d1a45365
commit
0939d72702
4 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-07 Alain Magloire
|
||||
Fix PR 82202
|
||||
* src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java
|
||||
* src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java
|
||||
* src/org/eclipse/cdt/internal/ui/util/Resources.java
|
||||
|
||||
2004-12-22 Alain Magloire
|
||||
|
||||
On going work to clean cdt.ui from misc. warnings
|
||||
|
|
|
@ -141,10 +141,14 @@ class CViewDropAdapter extends PluginDropAdapter implements IOverwriteQuery {
|
|||
//Apples to apples...
|
||||
IResource resourceCurrentContainer = currentContainer.getResource();
|
||||
ResourceAttributes attributes = tempResource.getResourceAttributes();
|
||||
boolean isReadOnly = true;
|
||||
if (attributes != null) {
|
||||
isReadOnly = attributes.isReadOnly();
|
||||
}
|
||||
if (tempResourceParent.equals(resourceCurrentContainer) ||
|
||||
tempResource.equals(resourceCurrentContainer) ||
|
||||
tempResource.equals(resourceCurrentContainer.getParent()) ||
|
||||
attributes.isReadOnly()){
|
||||
isReadOnly){
|
||||
event.detail = DND.DROP_NONE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -364,7 +364,9 @@ public class DocumentAdapter implements IBuffer, IDocumentListener {
|
|||
IResource resource= getUnderlyingResource();
|
||||
if (resource != null) {
|
||||
ResourceAttributes attributes = resource.getResourceAttributes();
|
||||
return attributes.isReadOnly();
|
||||
if (attributes != null) {
|
||||
return attributes.isReadOnly();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public class Resources {
|
|||
IResource resource= resources[i];
|
||||
if (resource.getType() == IResource.FILE) {
|
||||
ResourceAttributes attributes = resource.getResourceAttributes();
|
||||
if (attributes.isReadOnly()) {
|
||||
if (attributes != null && attributes.isReadOnly()) {
|
||||
readOnlyFiles.add(resource);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue