Skip to content

Commit

Permalink
Code Cleanup in pde.core: Edits
Browse files Browse the repository at this point in the history
  • Loading branch information
alshamams authored and akurtakov committed Sep 20, 2023
1 parent b2f88d1 commit 01fca40
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public boolean visit(IResourceDelta delta) {
}

if (resource instanceof IFile candidate) {
// see if this is it
if (isSchemaFile(candidate)) {
// That's it, but only check it if it has been added or changed
if (delta.getKind() != IResourceDelta.REMOVED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public boolean visit(IResourceDelta delta) {
IResource resource = delta.getResource();

if (resource instanceof IProject project) {
// Only check projects with feature nature
try {
return (project.hasNature(PDE.FEATURE_NATURE));
} catch (CoreException e) {
Expand All @@ -57,6 +58,7 @@ public boolean visit(IResourceDelta delta) {
}
}
if (resource instanceof IFile candidate) {
// see if this is it
if (isManifestFile(candidate)) {
// That's it, but only check it if it has been added or changed
if (delta.getKind() != IResourceDelta.REMOVED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public boolean visit(IResourceDelta delta) {
IResource resource = delta.getResource();

if (resource instanceof IProject project) {
// Only check projects with feature nature
try {
return (project.hasNature(PDE.SITE_NATURE));
} catch (CoreException e) {
Expand All @@ -54,6 +55,7 @@ public boolean visit(IResourceDelta delta) {
}
}
if (resource instanceof IFile candidate) {
// see if this is it
if (candidate.getName().equals("site.xml")) { //$NON-NLS-1$
// That's it, but only check it if it has been added or changed
if (delta.getKind() != IResourceDelta.REMOVED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ private void configureManifest(IBundleProjectDescription description, IBundlePro
}
}
if (pluginBase instanceof IFragment fragment) {
// host specification
IHostDescription host = description.getHost();
if (!isEqual(host, before.getHost())) {
fragment.setPluginId(host.getName());
Expand Down

0 comments on commit 01fca40

Please sign in to comment.