From a9dcd2be0dc67fed5bb88cf2d3f149d5e08c98c9 Mon Sep 17 00:00:00 2001 From: Milandeep Singh Shergill Date: Wed, 10 Apr 2013 08:27:54 -0400 Subject: Bug 404680 - Update CDT & Spawner Miners to handle generic commands and not spirit them --- .../remote/rse/core/miners/SpawnerMiner.java | 10 ++--- .../ptp/internal/rdt/core/miners/CDTMiner.java | 51 ++++++++++++++++++---- 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; } -- cgit v1.2.3