BowlerHatLLC / BowlerHatLLC/vscode-as3mxml

Check SWCs for design.xml to get suggestions for MXML namespace prefixes

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Java
Stars
282
Forks
45
PR merge metrics
No merged PRs in 30d

Description

This should happen in `MXMLNamespaceUtils.getMXMLNamespaceForTypeDefinition()`.

Some code to get started:

``` java
if (prefix == null)
{
for (ISWC swc : currentProject.getLibraries())
{
if (swc.getSWCFile().getAbsolutePath().equals(definition.getContainingFilePath()))
{
//design.xml is an optional file that contains a suggested
//namespace for the namespaces the SWC contains
ISWCFileEntry fileInSWC = swc.getFile("design.xml");
if (fileInSWC != null)
{
//TODO: figure out how to parse the file and extract the prefix
}
}
}
}
```

Example *design.xml*:

``` xml












```

Source of sample *design.xml*: http://www.morearty.com/blog/2008/11/19/extending-flex-builder-sample-code-for-designxml/

Contributor guide

Open the contributing guide

Research direction

Start in MXMLNamespaceUtils.getMXMLNamespaceForTypeDefinition() and trace the existing SWC lookup using ISWCFileEntry for design.xml. Use the provided design.xml structure to determine the namespace prefix for the definition URI; done means a matching suggestion is returned when the prefix is otherwise null.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, xml
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.