Changeset 287 for trunk/org.modelica.mdt.ui/src/org/modelica/mdt
- Timestamp:
- 01/26/06 15:36:27 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/editor/ModelicaCompletionProcessor.java
r273 r287 56 56 import org.eclipse.jface.text.contentassist.IContextInformationValidator; 57 57 import org.modelica.mdt.core.CompilerProxy; 58 import org.modelica.mdt.core.Element; 59 import org.modelica.mdt.core.List; 60 import org.modelica.mdt.core.ListElement; 58 61 import org.modelica.mdt.core.compiler.CompilerException; 59 62 import org.modelica.mdt.core.compiler.ConnectException; … … 81 84 * proposals. This allows us to backtrace the proposals. 82 85 */ 83 Vector<Object> narrowedProposals = new Vector<Object>();84 Vector<Object> proposals = new Vector<Object>();86 List narrowedProposals = new List(); 87 List proposals = new List(); 85 88 int typeAhead = 0; 86 89 … … 155 158 { 156 159 if(proposals != null) 160 { 157 161 proposals.clear(); 162 } 158 163 else 159 proposals = new Vector<Object>(); 164 { 165 proposals = new List(); 166 } 160 167 if(narrowedProposals != null) 168 { 161 169 narrowedProposals.clear(); 170 } 162 171 else 163 narrowedProposals = new Vector<Object>(); 172 { 173 narrowedProposals = new List(); 174 } 164 175 165 176 typeAhead = 0; … … 180 191 { 181 192 if(proposals != null) 193 { 182 194 narrowedProposals.addAll(proposals); 195 } 183 196 } 184 197 } … … 198 211 narrowedProposals.clear(); 199 212 200 for (Object proposedClass : proposals)201 { 202 if (((String)proposedClass).startsWith(classPrefix))203 { 204 narrowedProposals.a dd(proposedClass);213 for (ListElement proposedClass : proposals) 214 { 215 if (((Element)proposedClass).toString().startsWith(classPrefix)) 216 { 217 narrowedProposals.append(proposedClass); 205 218 } 206 219 } … … 275 288 outputParameters.clear(); 276 289 277 Vector<Object> elementsInfo = new Vector<Object>(0);290 List elementsInfo; 278 291 279 292 try … … 302 315 boolean elementNamesFound = false; 303 316 boolean typenameFound = false; 304 Vector names = new Vector(0);317 List names = new List(); 305 318 String typename = ""; 306 319 … … 355 368 && elementIsInput && elementNamesFound && typenameFound) 356 369 { 357 inputParameters.add(typename + " " + (String)names.get(0));370 inputParameters.add(typename + " " + names.elementAt(0).toString()); 358 371 } 359 372 else if(elementIsPublic && elementIsComponent 360 373 && elementIsOutput && elementNamesFound && typenameFound) 361 374 { 362 outputParameters.add(typename + " " + (String)names.get(0)); 363 375 outputParameters.add(typename + " " + names.elementAt(0).toString()); 364 376 } 365 377 } … … 401 413 for(int i = 0;i < narrowedProposals.size();i++) 402 414 { 403 String proposal = (String)narrowedProposals.get(i);415 String proposal = narrowedProposals.elementAt(i).toString(); 404 416 completionProposals[i] = 405 417 new CompletionProposal(proposal, offset - typeAhead, typeAhead,
Note: See TracChangeset
for help on using the changeset viewer.