Comments (7)
Works for me, could you send me your format settings file?
What is the failure? Do you have stacktrace?
from eclipsecodeformatter.
As I'm not sure if I'm allowed to hand out the formatter file, I cant't give you this as of now. (I'll check if I'm allowed to, though).
This Exception shows in the log file:
krasa.formatter.exception.FormattingFailedException
at krasa.formatter.eclipse.JSCodeFormatterFacade.formatInternal(JSCodeFormatterFacade.java:83)
at krasa.formatter.eclipse.CodeFormatterFacade.format(CodeFormatterFacade.java:18)
at krasa.formatter.plugin.EclipseCodeFormatter.reformat(EclipseCodeFormatter.java:103)
at krasa.formatter.plugin.EclipseCodeFormatter.formatWhenEditorIsOpen(EclipseCodeFormatter.java:84)
at krasa.formatter.plugin.EclipseCodeFormatter.format(EclipseCodeFormatter.java:51)
at krasa.formatter.plugin.EclipseCodeStyleManager.formatWithEclipse(EclipseCodeStyleManager.java:187)
at krasa.formatter.plugin.EclipseCodeStyleManager.format(EclipseCodeStyleManager.java:95)
at krasa.formatter.plugin.EclipseCodeStyleManager.reformatText(EclipseCodeStyleManager.java:59)
at com.intellij.codeInsight.actions.ReformatCodeProcessor$1.call(ReformatCodeProcessor.java:94)
at com.intellij.codeInsight.actions.ReformatCodeProcessor$1.call(ReformatCodeProcessor.java:83)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$1.call(AbstractLayoutCodeProcessor.java:199)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$1.call(AbstractLayoutCodeProcessor.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$3.run(AbstractLayoutCodeProcessor.java:255)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$10$1$1.run(AbstractLayoutCodeProcessor.java:484)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:85)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$10$1.run(AbstractLayoutCodeProcessor.java:479)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
from eclipsecodeformatter.
The config file should contain only some eclipse formatter settings, therefore nothing sensitive.
The error means that the eclipse formatter failed somewhere inside, unfortunately it never tells why, probably upgrade of eclipse libs could help.
Does it work in Eclipse? If so, which version?
from eclipsecodeformatter.
Formatting in Eclipse works. Version is Kepler, SR1 build 20130919-0819.
I additionally found out, that the instanceof operator in the if condition makes the difference.
from eclipsecodeformatter.
Ok, it contains much newer lib, My guess is that if you replace this lib:
org.eclipse.wst.jsdt.core_1.1.101.v201108151912.jar
in .WebStorm\config\plugins\EclipseFormatter\lib
by that from your eclipse, it should start to work.
from eclipsecodeformatter.
Unfortunately not.
As a workaround I changed the if condition to use the $classname property instead of the instanceof operator.
from eclipsecodeformatter.
I have upgraded all libs, if that does not help, I don't know what will.
from eclipsecodeformatter.
Related Issues (20)
- Resolve project specific config can not find configuration file HOT 1
- Document is locked by write PSI operations during Replace in files
- Error logged by IDEA
- Eclipse Correct Indentation leads to different result
- Document version of bundled eclipse used by this plugin
- Newest Eclipse version is not compatible with EclipseCodeFormatter
- Failed to format with Adapter for Eclipse Code Formatter. Formatter config file not resolved. HOT 13
- @formatter:off is not working HOT 3
- Absolute Path to config file gets replaced with relative path using variable $PROJECT_DIR$ rendering settings unusable for a global central settings location HOT 7
- error failed to format with Adapter for Eclipse Code Formatter. Configured settings file does not exist, path="" HOT 3
- IconDeferrerImpl.clearCache IllegalStateException HOT 7
- Incompatible with IDEA2023.3.1 HOT 1
- Upgrade bundled eclipse to 2023-12 (4.30) HOT 3
- Code formatting before committing is not working in the newer version of IntelliJ IDEA
- EclipseCodeStyleManager not honoring plugin listeners HOT 4
- Eclipse Formatter not called in IntelliJ 2024.1 EAP HOT 1
- ImportsComparator IndexNotReadyException
- Methods starting with βwhen(β¦)β in test files are left unformatted HOT 1
- IntelliJ Code Cleanup does not take the Eclipse formatting into account
- Failed to format notification since 2024.1.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipsecodeformatter.