Changeset 369 for trunk/org.modelica.mdt.ui/src/org/modelica/mdt
- Timestamp:
- 02/23/06 20:42:33 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/editor/ModelicaCompletionProcessor.java
r365 r369 403 403 { 404 404 case QUALIFIED: 405 computeCompPropsFromPackage(imp.getImportedPackage(), 405 computeCompPropsFromPackage(imp.getImportedPackage(), null, 406 406 prefix, offset, proposals); 407 407 break; … … 409 409 break; 410 410 case RENAMING: 411 computeCompPropsFromPackage(imp.getImportedPackage(), 412 imp.getAlias(), prefix, offset, proposals); 411 413 break; 412 414 } … … 414 416 } 415 417 418 /** 419 * Compute proposals based on an imported package. This method 420 * bases the computation on package, packages alias if available, 421 * the prefix before current cursor position. 422 * 423 * Proposals are added to provided list 'proposals' list. Given offset 424 * is used to create completion propopal object with correct replacement 425 * data. 426 * 427 * @param importedPackage the package that is imported 428 * @param packageAlias package's alias or null if package have no alias 429 * @param prefix the prefix before current cursor position 430 * @param offset the current cursor position in the document 431 * @param proposals the computed proposals will be added to this list 432 */ 416 433 private void computeCompPropsFromPackage(IModelicaClass importedPackage, 434 String packageAlias, 417 435 String prefix, int offset, 418 436 Collection<ICompletionProposal> proposals) … … 425 443 */ 426 444 int firstDot = prefix.indexOf('.'); 427 String packageName = importedPackage.getElementName(); 428 445 String packageName; 446 447 if (packageAlias != null) 448 { 449 packageName = packageAlias; 450 } 451 else 452 { 453 packageName = importedPackage.getElementName(); 454 } 455 429 456 if (firstDot == -1) 430 457 {
Note: See TracChangeset
for help on using the changeset viewer.