Comments (12)
#43 will fix it afaik, and btw this issue effectively kills the ide performance.
from intellij-plugin-save-actions.
@krasa Thanks, for taking a look at this. I have tested your branch with the changes and the issue still exists. I have taken a look at the logs and everything seems to run correctly within the plugins (no errors). However, the logging messages continually repeat, therefore, I'm curious if there is something flooding the MessageBus
with AppTopics.FILE_DOCUMENT_SYNC
topics which SaveActionsManager
is subscribed to causing it to continually process the same file.
from intellij-plugin-save-actions.
how do you reproduce it? I get at most 3 formatings per one save, which is bad, but certainly no infinite loop as before without the patch when 2 projects were opened...
from intellij-plugin-save-actions.
I think part of the problem is that I trigger saving of the file in Eclipse Formatter plugin for various reasons.
But perhaps it could be handled, if you do ReflectionToStringBuilder.toString(IdeEventQueue.getInstance().getTrueCurrentEvent())
then this is the good event:
java.awt.event.KeyEvent@7557a4bb[isProxyActive=false,keyCode=83,keyChar=�,keyLocation=1,when=1463598146868,modifiers=130,bdata={0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,83,0,0,0,0,0,0,0,1,0,31,0,0,0,0,0,-44,115,110,2,0,0,0,0,0,0,0,0,0,0,0,0},id=401,consumed=true]
and this is unwanted one which is probably triggered by my Eclipse Formatter:
java.awt.event.InvocationEvent@60aba7d[runnable=LaterInvocator.FlushQueue lastInfo=[runnable: com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$8$1@2a5967a4; state=ModalityState.NON_MODAL] ,notifier=<null>,catchExceptions=false,exception=<null>,throwable=<null>,when=1463598146963,bdata=<null>,id=1200,consumed=false]
from intellij-plugin-save-actions.
I simply have the comment within a test java class that looks like below and add spaces/change a letter, then save and it will continually happen. It's possibly some of the settings I have may be interacting with the saves causing it to happen more often than it should.
public class TestCodeFormat {
/*
private void printDeviceTree(CheckPointDevice device, String indent) {
if (device == null) return;
String text = device.getCpType().toString() + " " + device.getName() + ":" + device.getIpAddress();
logger.error(indent + text);
for (CheckPointDevice child : device.getChildren()) {
printDeviceTree(child, indent + " ");
}
}
*/
}
from intellij-plugin-save-actions.
Some other plugin could trigger it... Anyways, try this https://github.com/krasa/intellij-plugin-save-actions/tree/skipEvents
from intellij-plugin-save-actions.
@krasa This was indeed the case where there were many InvocationEvents
causing it to reformat and skipEvents resolves the issue.
Thank you for your time.
from intellij-plugin-save-actions.
Well, it did not work for me entirely... for some reason I get also these, even with default formatter:
java.awt.event.InvocationEvent@2b426b13[runnable=LaterInvocator.FlushQueue lastInfo=[runnable: com.intellij.openapi.application.TransactionGuardImpl$7@5882d166; state=ModalityState.NON_MODAL] ,notifier=<null>,listener=<null>,dispatched=false,catchExceptions=false,exception=<null>,throwable=<null>,when=1463602498882,bdata=<null>,id=1200,consumed=false]
edit: so that is also triggered by automatic save, so it is a problem...
from intellij-plugin-save-actions.
from intellij-plugin-save-actions.
Is that still present? I never merged #46 because I couldn't figure out what it was for.
from intellij-plugin-save-actions.
It was present when I was working with my old company on the latest branch. However, worked when using Krasa's branch. So it is up to you whether you want to close the issue/merge.
from intellij-plugin-save-actions.
If someone needs it, reopen
from intellij-plugin-save-actions.
Related Issues (20)
- StackOverlfow.
- CustomUnqualifiedStaticUsageInspection: display name should be overridden or configured via XML [Plugin: com.dubreuia] HOT 5
- bulk save action performance
- The specified parameters not match any of the following constructors: public com.dubreuia.model.Storage() HOT 1
- Exception in Save Actions 2.3.0 HOT 1
- Save Actions not working in WebStorm EAP version HOT 4
- Removal of required suppress warning annotation HOT 1
- Looking for gradle tasks integration option in save action plugin HOT 1
- Exception in IntelliJ 2023.1 HOT 1
- RuntimeException in IntelliJ 2023.1 HOT 21
- Cannot create configurable error on fresh plugin install HOT 7
- Cannot create configurable HOT 3
- Request: for "Reformat file" on save, please prevent it in case it changes logic or when the code has errors HOT 10
- Cannot save, launch, or commit changes, due to RuntimeException: Cannot invoke (class=SaveActionManager, method=beforeAllDocumentsSaving, topic=FileDocumentManagerListener) HOT 4
- Exception: Cannot create configurable HOT 2
- Can not commit git By idea2023.1 HOT 2
- Unexception: Save Actions occurs errors when starting tomcat server HOT 2
- com.intellij.diagnostic.PluginException: No display name is specified for configurable com.dubreuia.ui.Configuration in xml file HOT 2
- com.intellij.diagnostic.PluginException: No display name specified in plugin descriptor XML file for configurable com.dubreuia.ui.Configuration; specify it using 'displayName' or 'key' attribute to avoid necessity to load the configurable class when Settings dialog is opened [Plugin: com.dubreuia] HOT 3
- java.lang.RuntimeException: Cannot invoke (class=SaveActionManager, method=beforeAllDocumentsSaving, topic=FileDocumentManagerListener) HOT 1
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 intellij-plugin-save-actions.