SapphireSteel Forum
Welcome,
Guest
. Please
login
or
register
.
May 24, 2013, 11:25:58 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3884
Posts in
800
Topics by
669
Members
Latest Member:
m
SapphireSteel Forum
General
Amethyst
Add Import always adding to the very top
« previous
next »
Pages:
[
1
]
Author
Topic: Add Import always adding to the very top (Read 751 times)
Jason King
Full Member
Posts: 159
Add Import always adding to the very top
«
on:
May 30, 2011, 01:29:38 PM »
When right-clicking on a class in actionscript code, you are given the option to Organize Import->Add Import. It is adding the appropriate import statement, but it is not placing it properly. Instead of placing it after the package declaration line, it is placing it before.
Seeing...
Code:
import flash.display.MovieClip;
package
{
public class Foo extends MovieClip
{
}
}
But was expecting...
Code:
package
{
import flash.display.MovieClip;
public class Foo extends MovieClip
{
}
}
Logged
Huw Collingbourne
Administrator
Hero Member
Posts: 934
Re: Add Import always adding to the very top
«
Reply #1 on:
May 30, 2011, 02:07:13 PM »
I've just tested this. I think this occurs if you put blank lines above your
package
...
Code:
package
{
Whereas it works as expected if
package
is on the first line...
Code:
package
{
Can you verify that. If that's the problem, I'll enter it as a bug.
I think there may also be odd behaviour if your opening { is on the next line. Our standard for formatting is to have { on the same line. Again, I'd be grateful if you could confirm.
Huw
«
Last Edit: May 30, 2011, 02:09:04 PM by Huw Collingbourne
»
Logged
Jason King
Full Member
Posts: 159
Re: Add Import always adding to the very top
«
Reply #2 on:
May 30, 2011, 07:58:37 PM »
Hi Huw,
If there is an empty line before package then it is as I described. If there is not then you get...
Code:
package
import flash.display.MovieClip;
{
public class Foo extends MovieClip
{
}
}
If the first line is "package {" then you it will add as you would expect. However, if there is an empty line before "package {" then it will result in...
Code:
import flash.display.MovieClip;
package {
public class Foo extends MovieClip
{
}
}
Cheers,
Jason
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and Announcements
=> Amethyst
=> Ruby In Steel
=> Ruby Programming
=> The Snug Bar