GithubHelp home page GithubHelp logo

Comments (11)

krasa avatar krasa commented on July 24, 2024

Send me a screenshot of your settings of this plugin, and the file which you use for optimize imports settings.

from eclipsecodeformatter.

krasa avatar krasa commented on July 24, 2024

Seriously m8, I don't know how to help you :)

from eclipsecodeformatter.

zhuliangliang avatar zhuliangliang commented on July 24, 2024

I came into this problem too. In last version, that would not happen.

from eclipsecodeformatter.

krasa avatar krasa commented on July 24, 2024

That's because I have added validation.
So either your file is wrong, or the validation. But how could I know if you do not send the file to me?

from eclipsecodeformatter.

zhaozhxcn avatar zhaozhxcn commented on July 24, 2024

Eclipse Import Optimizer failed: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.
krasa.formatter.exception.ParsingFailedException: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.

from eclipsecodeformatter.

zhaozhxcn avatar zhaozhxcn commented on July 24, 2024

Eclipse Import Optimizer failed: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.
krasa.formatter.exception.ParsingFailedException: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.

from eclipsecodeformatter.

zhaozhxcn avatar zhaozhxcn commented on July 24, 2024

Eclipse Import Optimizer failed: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.
krasa.formatter.exception.ParsingFailedException: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.

from eclipsecodeformatter.

zhaozhxcn avatar zhaozhxcn commented on July 24, 2024

Eclipse Import Optimizer failed: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.
krasa.formatter.exception.ParsingFailedException: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.

from eclipsecodeformatter.

zhaozhxcn avatar zhaozhxcn commented on July 24, 2024

Eclipse Import Optimizer failed: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.
krasa.formatter.exception.ParsingFailedException: You must provide either *.importorder file or 'org.eclipse.jdt.ui.prefs' file, see instructions.

from eclipsecodeformatter.

zhongliangjun1 avatar zhongliangjun1 commented on July 24, 2024

step1:
find the org.eclipse.jdt.ui.prefs file under your eclipse workspace ( /workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs )

step2:
copy it to another space

step3:
add "org.eclipse.jdt.ui.importorder=java;javax;org;com;" to it

step4:
set your Import order from the org.eclipse.jdt.ui.prefs file which you adjust just now.

from eclipsecodeformatter.

zhongliangjun1 avatar zhongliangjun1 commented on July 24, 2024
  • Check "Optimizing Imports" configuration
    • Set import order
      • Either leave the default
      • Or set path to Eclipse configuration file:
        • Go to Eclise | Windows | Preferences | Java | Code Style | Organize Imports
        • Either click on "Export...", (example)
        • Or enable project specific settings and use "org.eclipse.jdt.ui.prefs" file which should contain the line "org.eclipse.jdt.ui.importorder=..."
    • Value of "Class count to use import with ''" and "Name count to use static import with ''" (Settings | Editor | Code Style | Imports) - Eclipse uses value of 30 by default
    • For versions lower than 4.0 - make sure to keep disabled IntelliJ's Import Optimizing in the reformat dialog (Settings | Editor | Show "Reformat Code" dialog), the plugin will take care of imports anyway
    • For versions higher than 4.0 - imports will be reordered together with normal IntelliJ's import optimizing
    • Disable "Optimize imports on the fly"

from eclipsecodeformatter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.