- Timestamp:
- 10/25/05 11:49:11 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt/src/org/modelica/mdt/ModelicaElementContentProvider.java
r83 r88 50 50 import org.modelica.mdt.core.IModelicaProject; 51 51 import org.modelica.mdt.core.IModelicaRoot; 52 import org.modelica.mdt.core.IParent; 52 53 53 54 /** … … 77 78 public void dispose() 78 79 { 80 System.out.println("disposed " + ModelicaElementContentProvider.class); 79 81 } 80 82 81 83 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) 82 84 { 85 System.out.println("input changed " + ModelicaElementContentProvider.class); 83 86 } 84 87 … … 99 102 { 100 103 IModelicaProject mp = (IModelicaProject)parent; 101 return concatenate(mp.getPackages(), mp.getClasses()); 104 return MdtPlugin.concatenate(mp.getPackages(), mp.getClasses()); 105 } 106 else if (parent instanceof IParent) 107 { 108 System.out.println("get children of " + parent); 109 Object[] ch = ((IParent)parent).getChildren(); 110 for (Object ob : ch) 111 { 112 System.out.println("got " + ob.getClass()); 113 } 114 115 return ch; 116 //return ((IParent)parent).getChildren(); 102 117 } 103 118 return null; … … 106 121 public Object getParent(Object element) 107 122 { 123 System.out.println("get parent " + ModelicaElementContentProvider.class); 108 124 return null; 109 125 } … … 123 139 return ((IModelicaProject)element).getProject().isOpen(); 124 140 } 141 else if (element instanceof IParent) 142 { 143 return true; 144 } 125 145 return false; 126 146 } 127 128 /**129 * Note: This method is for internal use only. Clients should not call this method.130 */131 protected static Object[] concatenate(Object[] a1, Object[] a2) {132 int a1Len= a1.length;133 int a2Len= a2.length;134 Object[] res= new Object[a1Len + a2Len];135 System.arraycopy(a1, 0, res, 0, a1Len);136 System.arraycopy(a2, 0, res, a1Len, a2Len);137 return res;138 }139 140 147 }
Note: See TracChangeset
for help on using the changeset viewer.