Changeset 1867 for trunk/org.modelica.mdt.ui/src
- Timestamp:
- 02/04/15 10:25:15 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/view/ModelicaContentOutlinePage.java
r1280 r1867 2 2 * @author Adrian Pop [adrpo@ida.liu.se, http://www.ida.liu.se/~adrpo] 3 3 * Copyright (c) 2006 Adrian Pop [adrpo@ida.liu.se] 4 * All rights reserved. 4 * All rights reserved. 5 5 * Permission to use, copy, modify, and distribute this software and 6 * its documentation for NON-COMMERCIAL purposes and without fee is hereby 7 * granted, provided that this copyright notice appear in all copies and 6 * its documentation for NON-COMMERCIAL purposes and without fee is hereby 7 * granted, provided that this copyright notice appear in all copies and 8 8 * that both the copyright notice and this permission notice and warranty 9 9 * disclaimer appear in supporting documentation, and that the name of 10 10 * The Author not be used in advertising or publicity pertaining to 11 11 * distribution of the software without specific, written prior permission. 12 * 13 * COMMERCIAL use, copy, modification and distribution 14 * is NOT permitted without prior written agreement with 12 * 13 * COMMERCIAL use, copy, modification and distribution 14 * is NOT permitted without prior written agreement with 15 15 * Adrian Pop [adrpo@ida.liu.se]. 16 * 16 * 17 17 * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18 18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. … … 113 113 static IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore(); 114 114 115 ModelicaEditor fEditor = null; 115 ModelicaEditor fEditor = null; 116 116 117 117 private IModelicaElement fInput; … … 144 144 updateSelectionProvider(getSite()); 145 145 } 146 } 146 } 147 147 148 148 … … 243 243 try { 244 244 return c.hasChildren(); 245 } 246 catch (Exception x) 245 } 246 catch (Exception x) 247 247 { 248 248 // do nothing … … 275 275 fListener.setViewer(viewer); 276 276 ModelicaCore.getModelicaRoot().addModelicaElementChangeListener(fListener); 277 } 277 } 278 278 else if (!isMO && fListener != null) { 279 279 ModelicaCore.getModelicaRoot().removeModelicaElementChangeListener(fListener); … … 291 291 final boolean matchedAsIn = searchParameterArray(inputs, name, typeName); 292 292 final boolean matchedAsOut = searchParameterArray(outputs, name, typeName); 293 293 294 294 String decoratedName = name; 295 295 … … 301 301 } 302 302 else if (!matchedAsIn && !matchedAsOut) { 303 ErrorManager.logWarning("That's odd, that parameter did not match as being neither in nor out.");303 // ErrorManager.logWarning("That's odd, that parameter did not match as being neither in nor out."); 304 304 } 305 305 else { // if matchedAsIn && matchedAsOut 306 306 ErrorManager.logWarning("That's odd, that parameter matched as being both in and out."); 307 307 } 308 308 309 309 IModelicaComponent newComponent = new ModelicaComponent(parent, decoratedName, typeName, visibility, definitionLocation); 310 310 311 311 return newComponent; 312 312 } … … 475 475 476 476 private ModelicaElementComparator fComparator= new ModelicaElementComparator(ModelicaElementComparator.NAME); 477 private ModelicaElementComparator fModelicaComparator= new ModelicaElementComparator(ModelicaElementComparator.MODELICA); 477 private ModelicaElementComparator fModelicaComparator= new ModelicaElementComparator(ModelicaElementComparator.MODELICA); 478 478 479 479 public LexicalSortingAction() { 480 480 setText("Sort"); 481 setImageDescriptor(ModelicaImages.getImageDescriptor(ModelicaImages.IMG_OUTLINE_SORT)); 481 setImageDescriptor(ModelicaImages.getImageDescriptor(ModelicaImages.IMG_OUTLINE_SORT)); 482 482 setToolTipText("Sort"); 483 483 setDescription("Sorting lables"); 484 484 boolean checked= fCorePreferenceStore.getBoolean("ModelicaEditor.Outline.LexicalSortingAction.isChecked"); //$NON-NLS-1$ 485 valueChanged(checked, false); 485 valueChanged(checked, false); 486 486 } 487 487 … … 528 528 public ToggleLinkingAction(ModelicaContentOutlinePage outlinePage) { 529 529 boolean isLinkingEnabled= fCorePreferenceStore.getBoolean("ModelicaEditor.SyncOutlineOnCursorMove"); 530 setChecked(isLinkingEnabled); 530 setChecked(isLinkingEnabled); 531 531 fModelicaOutlinePage= outlinePage; 532 532 } … … 537 537 @Override 538 538 public void run() { 539 fCorePreferenceStore.setValue("ModelicaEditor.SyncOutlineOnCursorMove", isChecked()); 539 fCorePreferenceStore.setValue("ModelicaEditor.SyncOutlineOnCursorMove", isChecked()); 540 540 if (isChecked() && fEditor != null) { 541 541 fEditor.synchronizeOutlinePage(fEditor.computeHighlightRangeSourceReference(), false); … … 544 544 } 545 545 546 private IPropertyChangeListener fPropertyChangeListener; 546 private IPropertyChangeListener fPropertyChangeListener; 547 547 548 548 public ModelicaContentOutlinePage(String contextMenuID, ModelicaEditor editor) { … … 557 557 } 558 558 }; 559 fCorePreferenceStore.addPropertyChangeListener(fPropertyChangeListener); 559 fCorePreferenceStore.addPropertyChangeListener(fPropertyChangeListener); 560 560 } 561 561 … … 899 899 } 900 900 } 901 } 901 } 902 902 catch (Exception e) { 903 903 e.printStackTrace(); … … 958 958 try { 959 959 EditorUtility.openInEditor ((IModelicaElement)selection.getFirstElement()); 960 } 960 } 961 961 catch (CompilerException e) { 962 962 ErrorManager.showCompilerError(e);
Note: See TracChangeset
for help on using the changeset viewer.