diff --git a/CppTools.iml b/CppTools.iml
index dd00f97..a78fbd5 100644
--- a/CppTools.iml
+++ b/CppTools.iml
@@ -8,9 +8,7 @@
-
+
-
-
-
+
\ No newline at end of file
diff --git a/CppTools_Cardea.ipr b/CppTools_Cardea.ipr
index e950446..d2ebcd6 100644
--- a/CppTools_Cardea.ipr
+++ b/CppTools_Cardea.ipr
@@ -1,15 +1,5 @@
-
-
-
-
-
-
-
-
-
-
@@ -67,9 +57,7 @@
-
-
-
+
@@ -292,7 +280,7 @@
http://www.w3.org/1999/xhtml
-
+
@@ -332,5 +320,4 @@
-
-
+
\ No newline at end of file
diff --git a/META-INF/plugin.xml b/META-INF/plugin.xml
index fadabf4..7167ff6 100644
--- a/META-INF/plugin.xml
+++ b/META-INF/plugin.xml
@@ -2,7 +2,7 @@
C/C++
0.8 build 8
-
+
com.intellij.modules.lang
com.intellij.modules.java
AdvancedTools
diff --git a/README.md b/README.md
index 90e6479..902e715 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,15 @@
+# Update 2016/01/19
+
+- Hardcoded IDEA sandbox into ant.xml
+- Fixed GDB 7.11 debugging under linux
+- Commented out crash with Alarm (TODO: understand what I did)
+
+# Original readme
+
+
1. Plugin needs IntelliJ IDEA Plugin SDK defined and named as "IDEA", or you will need to modify the customJdkName
field in the CppTools_Cardea.ipr with the name of your plugin SDK.
2. Ant file needs IDEA_SANDBOX_HOME_PATH variable defined in settings, that is location defined in Idea plugin sdk.
3. Ant file assumes that native analyzer binaries and its resources are located in paret directory of the project.
When developing plugin stand-alone these binaries and resources are located in "lib" directory of existing plugin.
-4. Ant will also require a "DOC" directory exists in the parent directory of the project, so you will want to create it.
\ No newline at end of file
+4. Ant will also require a "DOC" directory exists in the parent directory of the project, so you will want to create it.
diff --git a/build.xml b/build.xml
index 611df1f..37f3b47 100644
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
-
+
@@ -10,10 +10,10 @@
-
+
diff --git a/src/com/advancedtools/cpp/CppFormattingModelBuilder.java b/src/com/advancedtools/cpp/CppFormattingModelBuilder.java
index d722cc6..67430ac 100644
--- a/src/com/advancedtools/cpp/CppFormattingModelBuilder.java
+++ b/src/com/advancedtools/cpp/CppFormattingModelBuilder.java
@@ -44,8 +44,9 @@ public TextRange replaceWhiteSpace(TextRange textRange, String whiteSpace) {
return myModel.replaceWhiteSpace(textRange, whiteSpace);
}
- public TextRange shiftIndentInsideRange(TextRange range, int indent) {
- return myModel.shiftIndentInsideRange(range, indent);
+ @Override
+ public TextRange shiftIndentInsideRange(ASTNode astNode, TextRange range, int indent) {
+ return myModel.shiftIndentInsideRange(astNode, range, indent);
}
public void commitChanges() {
diff --git a/src/com/advancedtools/cpp/CppSupportLoader.java b/src/com/advancedtools/cpp/CppSupportLoader.java
index cb53724..3067c4c 100644
--- a/src/com/advancedtools/cpp/CppSupportLoader.java
+++ b/src/com/advancedtools/cpp/CppSupportLoader.java
@@ -1064,16 +1064,16 @@ public void documentChanged(DocumentEvent event) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
try {
- ((Alarm)autoPopupControllerAlarmField.get(AutoPopupController.getInstance(project))).addRequest(
- new Runnable() {
- public void run() {
+ //((Alarm)autoPopupControllerAlarmField.get(AutoPopupController.getInstance(project))).addRequest(
+ //new Runnable() {
+ // public void run() {
PsiDocumentManager.getInstance(project).commitAllDocuments();
new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(project, selectedEditor);
- }
- },
- lookupDelay
- );
- } catch (IllegalAccessException e) {
+ // }
+ // },
+ // lookupDelay
+ //);
+ } catch (Throwable e) {//IllegalAccessException
e.printStackTrace();
}
}
diff --git a/src/com/advancedtools/cpp/communicator/ServerExecutableState.java b/src/com/advancedtools/cpp/communicator/ServerExecutableState.java
index e2708f8..d28124a 100644
--- a/src/com/advancedtools/cpp/communicator/ServerExecutableState.java
+++ b/src/com/advancedtools/cpp/communicator/ServerExecutableState.java
@@ -207,7 +207,7 @@ private String getBasePath() {
String s = PathManager.getPluginsPath() + File.separatorChar + CPP_TOOLS;
if (!new File(s).exists()) {
- s = PathManager.getPreinstalledPluginsPath() + File.separatorChar + CPP_TOOLS;
+ s = PathManager.getPreInstalledPluginsPath() + File.separatorChar + CPP_TOOLS;
if (!new File(s).exists()) {
throw new RuntimeException("Plugin home is not found");
diff --git a/src/com/advancedtools/cpp/debugger/CppBaseDebugRunner.java b/src/com/advancedtools/cpp/debugger/CppBaseDebugRunner.java
index 4196ed4..4c26764 100644
--- a/src/com/advancedtools/cpp/debugger/CppBaseDebugRunner.java
+++ b/src/com/advancedtools/cpp/debugger/CppBaseDebugRunner.java
@@ -31,13 +31,13 @@ protected RunContentDescriptor doExecute(Project project, RunProfileState runPro
final RunProfile runProfile = env.getRunProfile();
final XDebugSession debugSession =
- XDebuggerManager.getInstance(project).startSession(this, env, runContentDescriptor, new XDebugProcessStarter() {
- @NotNull
- public XDebugProcess start(@NotNull final XDebugSession session) {
- return new CppDebugProcess(session, CppBaseDebugRunner.this, (BaseCppConfiguration)runProfile);
- }
- });
-
+ XDebuggerManager.getInstance(project).startSession(env, new XDebugProcessStarter() {
+ @NotNull
+ @Override
+ public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
+ return new CppDebugProcess(session, CppBaseDebugRunner.this, (BaseCppConfiguration)runProfile);
+ }
+ });
return debugSession.getRunContentDescriptor();
}
diff --git a/src/com/advancedtools/cpp/debugger/CppDebugProcess.java b/src/com/advancedtools/cpp/debugger/CppDebugProcess.java
index 048a109..a050aa0 100644
--- a/src/com/advancedtools/cpp/debugger/CppDebugProcess.java
+++ b/src/com/advancedtools/cpp/debugger/CppDebugProcess.java
@@ -290,7 +290,13 @@ public void run() {
}
private boolean processOneCommand() throws IOException {
+ if(commandsToWrite.size()==0) {
+ //System.out.println("commandsToWrite Empty");
+ try{Thread.sleep(500);}catch(InterruptedException e){}
+ return false;
+ }
final DebuggerCommand command = commandsToWrite.removeFirst();
+ System.out.println(command);
command.post(context);
if (command instanceof QuitCommand) return true;
command.readResponse(context);
diff --git a/src/com/advancedtools/cpp/debugger/CppStackFrame.java b/src/com/advancedtools/cpp/debugger/CppStackFrame.java
index 612f63a..e22bdd3 100644
--- a/src/com/advancedtools/cpp/debugger/CppStackFrame.java
+++ b/src/com/advancedtools/cpp/debugger/CppStackFrame.java
@@ -89,15 +89,6 @@ public Object getEqualityObject() {
@Override
public XDebuggerEvaluator getEvaluator() {
return new XDebuggerEvaluator() {
- @Override
- public boolean evaluateCondition(@NotNull String s) {
- return false;
- }
-
- @Override
- public String evaluateMessage(@NotNull String s) {
- return null;
- }
@Override
public void evaluate(@NotNull final String evaluated, final @NotNull XEvaluationCallback xEvaluationCallback, @Nullable XSourcePosition xSourcePosition) {
diff --git a/src/com/advancedtools/cpp/debugger/CppSuspendContext.java b/src/com/advancedtools/cpp/debugger/CppSuspendContext.java
index f63248d..714026d 100644
--- a/src/com/advancedtools/cpp/debugger/CppSuspendContext.java
+++ b/src/com/advancedtools/cpp/debugger/CppSuspendContext.java
@@ -26,21 +26,29 @@ public CppSuspendContext(final CppStackFrame stackFrame, final CppDebuggerContex
myContext.sendAndProcessOneCommand(new DebuggerCommand("info threads") {
@Override
protected void processToken(String token, CppDebuggerContext context) {
- if (token.indexOf("thread") != -1) {
+ if (token.indexOf("thread") != -1 || token.indexOf("Thread") != -1 || token.indexOf("process") != -1) {
CppThreadStackInfo info;
- // "* "?6 thread 3020.0x890 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
+ // old format:
+ //* "?6 thread 3020.0x890 0x7c90e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll
+ // new format (single threaded apps):
+ //* 1 process 7059 "test" main () at test.c:10
boolean activeThread = token.charAt(0) == '*';
int startOffset = activeThread ? 2 : 0;
int threadIdEnd = token.indexOf(' ', startOffset);
- int startOfFunPos = token.indexOf(' ', token.indexOf(' ', threadIdEnd + 1) + 1);
int threadNo = Integer.parseInt(token.substring(startOffset, threadIdEnd));
+
+ startOffset = threadIdEnd;
+ while(startOffset lookupItem = new LookupItem(item, item.getPresentation());
- lookupItem.setTypeText(item.getTypeHint()).setInsertHandler(new BasicInsertHandler() {
+ lookupItem.setAttribute(LookupItem.TYPE_TEXT_ATTR, item.getTypeHint());
+ lookupItem.setInsertHandler(new BasicInsertHandler() {
@Override
public void handleInsert(InsertionContext insertionContext, LookupElement lookupElement) {
super.handleInsert(insertionContext, lookupElement);
diff --git a/testSrc/tests/BaseCppTestCase.java b/testSrc/tests/BaseCppTestCase.java
index 28f3f77..4b9960c 100644
--- a/testSrc/tests/BaseCppTestCase.java
+++ b/testSrc/tests/BaseCppTestCase.java
@@ -34,7 +34,7 @@ abstract class BaseCppTestCase extends TestCase {
protected void setUp() throws Exception {
super.setUp();
final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
- final TestFixtureBuilder testFixtureBuilder = fixtureFactory.createFixtureBuilder();
+ final TestFixtureBuilder testFixtureBuilder = fixtureFactory.createFixtureBuilder("cpp");
myFixture = fixtureFactory.createCodeInsightFixture(testFixtureBuilder.getFixture());
myFixture.setTestDataPath(new File("").getAbsolutePath() + File.separatorChar + getTestDataPath());