summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilandeep Singh Shergill2013-04-10 08:27:54 (EDT)
committer Chris Recoskie2013-04-10 08:35:22 (EDT)
commit94ae31e6bd61f118dbf2681c56e4b36c35716d60 (patch)
tree571eb27340dcd9ec0604c5f6331d5d3a7d428198
parentc5e853feb094fb283d556080ad7a36ccf8f2df5e (diff)
downloadorg.eclipse.ptp-94ae31e6bd61f118dbf2681c56e4b36c35716d60.zip
org.eclipse.ptp-94ae31e6bd61f118dbf2681c56e4b36c35716d60.tar.gz
org.eclipse.ptp-94ae31e6bd61f118dbf2681c56e4b36c35716d60.tar.bz2
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 9060eb1..be627e0 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 237d6e4..f5f3288 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;
}