fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
823 stars 220 forks source link

[Haxe] Organize imports shouldn't touch #elseif blocks #783

Open Gama11 opened 9 years ago

Gama11 commented 9 years ago

Organize imports ignores imports in blocks like these (as it should, too complex for FD to handle properly):

import haxe.unit.TestCase;

#if flash
import flash.display.Sprite;
import flixel.FlxGame;
#end

However, this:

import haxe.unit.TestCase;

#if flash
import flash.display.Sprite;
import flixel.FlxGame;
#elseif windows
import cpp.abi.Abi;
#end

Is turned into:

#if flash
import flash.display.Sprite;
import flixel.FlxGame;
#elseif windows
#end

This is tested with none of the imported types being used in the file.

Neverbirth commented 7 years ago

Fixed locally, I hope to be able to write some unit tests and make a PR during this week.