本文整理匯總了Java中org.eclipse.core.resources.IResourceDelta.REMOVED屬性的典型用法代碼示例。如果您正苦於以下問題:Java IResourceDelta.REMOVED屬性的具體用法?Java IResourceDelta.REMOVED怎麽用?Java IResourceDelta.REMOVED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.core.resources.IResourceDelta
的用法示例。
在下文中一共展示了IResourceDelta.REMOVED屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleResourceDelta
/**
* Handles the given resource delta.
*
* Fires workspace repository changed event if a project was opened/closed or a project was added/removed.
*/
private boolean handleResourceDelta(IResourceDelta delta) {
IResource affectedResource = delta.getResource();
if (affectedResource instanceof IProject) {
// check if kind is CHANGED
if ((delta.getKind() & IResourceDelta.CHANGED) == IResourceDelta.CHANGED) {
// if project was opened/closed
if ((delta.getFlags() & IResourceDelta.OPEN) == IResourceDelta.OPEN) {
fireWorkspaceRepositoriesChanged();
return false;
}
}
// check if kind is ADDED or REMOVED
else if ((delta.getKind() & IResourceDelta.ADDED | IResourceDelta.REMOVED) != 0) {
fireWorkspaceRepositoriesChanged();
return false;
}
}
return true;
}
示例2: visit
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
switch (delta.getKind()) {
case IResourceDelta.ADDED:
updateProjectPluginConfiguration(resource);
checkConsistency(resource);
break;
case IResourceDelta.REMOVED:
updateProjectPluginConfiguration(resource);
checkConsistency(resource);
break;
case IResourceDelta.CHANGED:
updateProjectPluginConfiguration(resource);
checkConsistency(resource);
break;
}
//return true to continue visiting children.
return true;
}
示例3: handleFileDelta
@Override
protected void handleFileDelta(IResourceDelta delta)
{
IFile file = (IFile) delta.getResource();
JarPluginModelImpl existing = jarModels.get(file);
if( delta.getKind() == IResourceDelta.REMOVED && existing != null )
{
removeJar(existing);
}
else if( delta.getKind() == IResourceDelta.ADDED )
{
if( isPluginJar(file) )
{
addJarModel(fModels.get(file.getProject()), file, true);
}
}
else if( delta.getKind() == IResourceDelta.CHANGED && existing != null )
{
existing.reload();
addChange(existing, IModelProviderEvent.MODELS_CHANGED);
}
}
示例4: visit
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
if (!PreferenceManager.isBuildEnabled(resource.getProject().getName())) {
if (resource instanceof IFile) {
deleteMarkers((IFile)resource);
}
return true;
}
switch (delta.getKind()) {
case IResourceDelta.ADDED:
checkResource(resource);
break;
case IResourceDelta.REMOVED:
checkRemovedResource(resource);
break;
case IResourceDelta.CHANGED:
checkResource(resource);
break;
}
// return true to continue visiting children.
return true;
}
示例5: visit
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
if (resource.getFileExtension() != null){
switch (delta.getKind()) {
case IResourceDelta.ADDED:
if(resource.getFileExtension().equals("java")){
executeBuild = true;
return false;
}
break;
case IResourceDelta.REMOVED:
if(resource.getFileExtension().equals("java")){
executeBuild = true;
return false;
}
break;
case IResourceDelta.CHANGED:
if( resource.getFileExtension().equals("java")){
executeBuild = true;
return false;
}
break;
}
}
return true;
}
示例6: visit
@Override
public boolean visit(final IResourceDelta delta) throws CoreException {
final IResource iResource = delta.getResource();
final String fileExtension = iResource.getFileExtension();
final boolean isMonitoredResource = VitruviusEmfBuilder.this.getMonitoredFileTypes().contains(fileExtension);
if (isMonitoredResource) {
switch (delta.getKind()) {
case IResourceDelta.ADDED:
LOGGER.debug("Importing to Vitruvius: " + iResource);
VitruviusEmfBuilder.this.importToVitruvius(iResource);
break;
case IResourceDelta.REMOVED:
LOGGER.debug("Removing from Vitruvius: " + iResource);
VitruviusEmfBuilder.this.removeFromVitruvius(iResource);
break;
case IResourceDelta.CHANGED:
// LOGGER.debug("Resource changed: " + iResource);
VitruviusEmfBuilder.this.triggerSynchronisation(iResource);
break;
default:
LOGGER.debug("No action for change kind: '" + delta.getKind() + "' executed.");
}
}
// return true to continue visiting children.
return true;
}
示例7: visit
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
switch (delta.getKind()) {
case IResourceDelta.ADDED:
checkABAP(resource);
break;
case IResourceDelta.REMOVED:
break;
case IResourceDelta.CHANGED:
checkABAP(resource);
break;
default: // do nothing
break;
}
return true;
}
示例8: recordChange
/**
* Record the change and return whether any child changes should be visited.
*
* @param delta the change
* @return whether any child changes should be visited
*/
public boolean recordChange(IResourceDelta delta) {
switch (delta.getKind()) {
case IResourceDelta.ADDED:
handleAdded(delta);
return true; // Need to traverse children to look for moves or other changes under added
// roots
case IResourceDelta.REMOVED:
handleRemoved(delta);
// No need to look for further changes under a remove (such as moves).
// Changes will be discovered in corresponding destination delta
return false;
case IResourceDelta.CHANGED:
handleChange(delta);
return true;
}
return true;
}
示例9: handleChangeDelta
/**
* Update the view for the given resource delta. The delta is a resource
* delta for the given build file in the view
*
* @param delta
* a delta for a build file in the view
* @param project
* the project node that has changed
*/
private void handleChangeDelta(IResourceDelta delta,
final IJSBuildFile project) {
IResource resource = delta.getResource();
if (resource.getType() != IResource.FILE) {
return;
}
if (delta.getKind() == IResourceDelta.REMOVED) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
removeProject(project);
}
});
} else if (delta.getKind() == IResourceDelta.CHANGED
&& (delta.getFlags() & IResourceDelta.CONTENT) != 0) {
handleBuildFileChanged(project);
}
}
示例10: processDelta
/**
* Processes the given {@link IResourceDelta} by
* {@link WorkspaceListener#fireChange(fr.obeo.dsl.workspace.listener.change.IChange) firing}
* {@link fr.obeo.dsl.workspace.listener.change.IChange IChange}.
*
* @param delta
* the {@link IResourceDelta} to process
* @param movedResources
* mapping of moved {@link IResource}
*/
private void processDelta(IResourceDelta delta, HashMap<IPath, IResource> movedResources) {
if (delta.getResource() instanceof IFile) {
switch (delta.getKind()) {
case IResourceDelta.ADDED:
processAddedDelta(delta, movedResources);
break;
case IResourceDelta.REMOVED:
processRemovedDelta(delta, movedResources);
break;
case IResourceDelta.CHANGED:
processChangedDelta(delta);
break;
default:
break;
}
}
}
示例11: synchronizeTitaniumFiles
protected boolean synchronizeTitaniumFiles(IFile file, int deltaKind) {
if (file.getProject().equals(project) && file.getName().endsWith(".fui")){
switch (deltaKind) {
case IResourceDelta.ADDED :
return this.addTitaniumFile(file);
case IResourceDelta.REMOVED :
return this.removeTitaniumFile(file);
case IResourceDelta.CHANGED :
return this.updateTitanium(file);
default :
break; // only worried about added/removed/changed files
}
}
return false;
}
示例12: isErrorDelta
private boolean isErrorDelta(IResourceDelta delta)
{
if ((delta.getFlags() & IResourceDelta.MARKERS) != 0)
{
IMarkerDelta[] markerDeltas = delta.getMarkerDeltas();
for (int i = 0; i < markerDeltas.length; i++)
{
if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM))
{
int kind = markerDeltas[i].getKind();
if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED)
{
return true;
}
int severity = markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
int newSeverity = markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
if (newSeverity != severity)
{
return true;
}
}
}
}
return false;
}
示例13: process
public boolean process(IResource resource, int delta) {
if (isTouched() || !contains(resource)) {
return false;
}
if (resource.getType() == IResource.FILE) {
switch (delta) {
case IResourceDelta.ADDED:
case IResourceDelta.REMOVED:
touch();
return false;
default:
break;
}
}
return true;
}
示例14: visit
@Override
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
switch (delta.getKind()) {
case IResourceDelta.ADDED:
// handle added resource
check(resource);
break;
case IResourceDelta.REMOVED:
// handle removed resource
break;
case IResourceDelta.CHANGED:
// handle changed resource
check(resource);
break;
}
// return true to continue visiting children.
return true;
}
示例15: handleResource
public boolean handleResource ( final IResourceDelta delta, final IResource resource, final ComposedAdapterFactory adapterFactory, final Set<String> extensions, final IProgressMonitor monitor )
{
logger.debug ( "Handle resource - file: {}", resource );
if ( resource instanceof IProject )
{
return isInterestingProject ( (IProject)resource );
}
if ( resource instanceof IFolder )
{
return true;
}
if ( resource instanceof IFile )
{
final IFile file = (IFile)resource;
if ( !isModelFile ( file, extensions ) )
{
return false;
}
if ( delta == null || delta.getKind () != IResourceDelta.REMOVED )
{
validateFile ( file, adapterFactory, monitor );
}
}
return false;
}