Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilandeep Singh Shergill2013-04-10 12:27:54 +0000
committerChris Recoskie2013-04-10 12:27:54 +0000
commita9dcd2be0dc67fed5bb88cf2d3f149d5e08c98c9 (patch)
treea855c237dded01fee8b8894a0f46338f618d2792
parent35062db71c172f64a5850855208a430f04969bf9 (diff)
downloadorg.eclipse.ptp-a9dcd2be0dc67fed5bb88cf2d3f149d5e08c98c9.tar.gz
org.eclipse.ptp-a9dcd2be0dc67fed5bb88cf2d3f149d5e08c98c9.tar.xz
org.eclipse.ptp-a9dcd2be0dc67fed5bb88cf2d3f149d5e08c98c9.zip
Bug 404680 - Update CDT & Spawner Miners to handle generic commands and
not spirit them
-rw-r--r--core/org.eclipse.ptp.remote.rse.core/miners/org/eclipse/ptp/internal/remote/rse/core/miners/SpawnerMiner.java10
-rw-r--r--rdt/org.eclipse.ptp.rdt.core/miners/org/eclipse/ptp/internal/rdt/core/miners/CDTMiner.java51
2 files changed, 46 insertions, 15 deletions
diff --git a/core/org.eclipse.ptp.remote.rse.core/miners/org/eclipse/ptp/internal/remote/rse/core/miners/SpawnerMiner.java b/core/org.eclipse.ptp.remote.rse.core/miners/org/eclipse/ptp/internal/remote/rse/core/miners/SpawnerMiner.java
index 9060eb1b0..be627e0a7 100644
--- a/core/org.eclipse.ptp.remote.rse.core/miners/org/eclipse/ptp/internal/remote/rse/core/miners/SpawnerMiner.java
+++ b/core/org.eclipse.ptp.remote.rse.core/miners/org/eclipse/ptp/internal/remote/rse/core/miners/SpawnerMiner.java
@@ -156,9 +156,7 @@ public class SpawnerMiner extends Miner {
handleSpawnRedirected(subject, cmd, dir, envp, status);
- status.getDataStore().refresh(status);
- status.getDataStore().disconnectObject(status.getParent());
- return status;
+ return statusDone(status);
}
else if(name.equals(DataStoreSchema.C_CANCEL)) {
@@ -177,11 +175,9 @@ public class SpawnerMiner extends Miner {
{
fSupportsCharConversion = true;
-
+ return statusDone(status);
}
- status.getDataStore().refresh(status);
- status.getDataStore().disconnectObject(status.getParent());
return null;
}
@@ -194,7 +190,7 @@ public class SpawnerMiner extends Miner {
fProcessMap.put(cancelStatus, null);
}
}
-
+ statusDone(cancelStatus);
}
/**
diff --git a/rdt/org.eclipse.ptp.rdt.core/miners/org/eclipse/ptp/internal/rdt/core/miners/CDTMiner.java b/rdt/org.eclipse.ptp.rdt.core/miners/org/eclipse/ptp/internal/rdt/core/miners/CDTMiner.java
index 237d6e4fd..f5f328849 100644
--- a/rdt/org.eclipse.ptp.rdt.core/miners/org/eclipse/ptp/internal/rdt/core/miners/CDTMiner.java
+++ b/rdt/org.eclipse.ptp.rdt.core/miners/org/eclipse/ptp/internal/rdt/core/miners/CDTMiner.java
@@ -274,14 +274,10 @@ public class CDTMiner extends Miner {
provider = (IRemoteIndexerInfoProvider) Serializer.deserialize(getString(theCommand, 6));
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
- status.getDataStore().refresh(status);
- status.getDataStore().disconnectObject(status.getParent());
- return status;
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
- status.getDataStore().refresh(status);
- status.getDataStore().disconnectObject(status.getParent());
- return status;
+ return statusDone(status);
}
UniversalServerUtilities.logDebugMessage(LOG_TAG, "Indexing delta for scope: " + scopeName, _dataStore); //$NON-NLS-1$
@@ -335,8 +331,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -369,6 +367,7 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -390,8 +389,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -413,8 +414,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -437,8 +440,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -462,8 +467,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -487,8 +494,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -509,8 +518,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -531,8 +542,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -547,8 +560,10 @@ public class CDTMiner extends Miner {
handleComputeCompletionProposals(scopeName, context, unit, path, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -568,8 +583,10 @@ public class CDTMiner extends Miner {
handleComputeTypeGraph(scopeName, hostName, input, path, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_TYPE_HIERARCHY_FIND_INPUT1)) {
@@ -589,8 +606,10 @@ public class CDTMiner extends Miner {
handleFindTypeHierarchyInput(scopeName, hostName, projectName, input, path, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_TYPE_HIERARCHY_FIND_INPUT2)) {
@@ -611,8 +630,10 @@ public class CDTMiner extends Miner {
handleFindTypeHierarchyInput(scopeName, hostName, unit, path, projectName, selectionStart, selectionLength, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_NAVIGATION_OPEN_DECLARATION)) {
@@ -664,8 +685,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -688,8 +711,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -714,8 +739,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -738,8 +765,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
@@ -755,8 +784,10 @@ public class CDTMiner extends Miner {
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_SEMANTIC_HIGHTLIGHTING_COMPUTE_POSITIONS)) {
@@ -767,8 +798,10 @@ public class CDTMiner extends Miner {
handleComputeSemanticHightlightingPositions(scopeName, tu, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_INACTIVE_HIGHTLIGHTING_COMPUTE_POSITIONS)) {
@@ -794,8 +827,10 @@ public class CDTMiner extends Miner {
handleComputeCodeFoldingRegions(scopeName, tu, status, statementsFoldingEnabled, preprocessorFoldingEnabled, docSize);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
else if (name.equals(C_CODE_FORMATTING)) {
@@ -810,13 +845,13 @@ public class CDTMiner extends Miner {
handleComputeCodeFormatting(scopeName, tu, source, preferences, offset, length, status);
} catch (IOException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
} catch (ClassNotFoundException e) {
UniversalServerUtilities.logError(LOG_TAG, e.toString(), e, _dataStore);
+ return statusDone(status);
}
}
- status.getDataStore().refresh(status);
- status.getDataStore().disconnectObject(status.getParent());
return status;
}

Back to the top