Changeset 331 for trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui
- Timestamp:
- 02/16/06 14:33:48 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/editor/ModelicaCompletionProcessor.java
r324 r331 255 255 catch(BadLocationException e) 256 256 { 257 System.out.println("shhh, don't say anything"); 257 258 } 258 259 if(ch == '\n' || ch == '\t' || ch == ' ' … … 376 377 int offset) 377 378 { 378 IEditorInput input = editor.getEditorInput();379 // IEditorInput input = editor.getEditorInput(); 379 380 //TODO when eclipse restores the files that where left 380 381 // in the editor area when it was closed last time the … … 382 383 // thus code completion will not work, this should be fixed somehow 383 384 384 if (input instanceof ModelicaElementEditorInput)385 {386 IModelicaSourceFile file =387 ((ModelicaElementEditorInput)input).getSourceFile();388 System.out.println("we are looking at " + file);389 try390 {391 IModelicaClass clazz = file.getClassAt(offset);392 if (clazz != null)393 {394 System.out.println("class def is " + clazz.getElementName());395 }396 else397 {398 System.out.println("no class here");399 }400 }401 catch (Exception e)402 {403 System.out.println(e);404 e.printStackTrace();405 }406 }385 // if (input instanceof ModelicaElementEditorInput) 386 // { 387 // IModelicaSourceFile file = 388 // ((ModelicaElementEditorInput)input).getSourceFile(); 389 // System.out.println("we are looking at " + file); 390 // try 391 // { 392 // IModelicaClass clazz = file.getClassAt(offset); 393 // if (clazz != null) 394 // { 395 // System.out.println("class def is " + clazz.getElementName()); 396 // } 397 // else 398 // { 399 // System.out.println("no class here"); 400 // } 401 // } 402 // catch (Exception e) 403 // { 404 // System.out.println(e); 405 // e.printStackTrace(); 406 // } 407 // } 407 408 408 409 String className = findClassName(viewer, offset); 409 410 411 if (className == null || className.equals("")) 412 { 413 /* bail out without any proposals */ 414 return new ICompletionProposal[0]; 415 } 416 410 417 if(className.charAt(className.length() - 1) == '.') 411 418 {
Note: See TracChangeset
for help on using the changeset viewer.