Eclipse Spring工具套件中的Spring集成图编辑器选项卡丢失;“手动模式”;编辑原始XML源时进行编辑

Eclipse Spring工具套件中的Spring集成图编辑器选项卡丢失;“手动模式”;编辑原始XML源时进行编辑,eclipse,spring,spring-integration,sts-springsourcetoolsuite,spring-tool-suite,Eclipse,Spring,Spring Integration,Sts Springsourcetoolsuite,Spring Tool Suite,我目前正在使用Spring工具套件(STS)(版本:3.6.4.201412021321-CI-B775,构建Id:201411281415,平台:Eclipse Luna SR1(4.4.1))和Spring集成4.1.0 我有一个包含Spring集成命名空间的Spring配置XML文件。我有一个很大的工作流,很难在“自动布局”模式的集成图上很好地布局。因此,我做了以下工作: 进入集成图选项卡并使用“手动布局”模式 组织我的图表,然后我保存了布局 返回到“source”选项卡并向XML添加了

我目前正在使用Spring工具套件(STS)(版本:3.6.4.201412021321-CI-B775,构建Id:201411281415,平台:Eclipse Luna SR1(4.4.1))和Spring集成4.1.0

我有一个包含Spring集成命名空间的Spring配置XML文件。我有一个很大的工作流,很难在“自动布局”模式的集成图上很好地布局。因此,我做了以下工作:

  • 进入集成图选项卡并使用“手动布局”模式 组织我的图表,然后我保存了布局
  • 返回到“source”选项卡并向XML添加了一些组件 文件并保存了该文件
  • 返回到“集成图”选项卡后,“手动布局”将显示 仍然被选中(就像我上次离开屏幕时一样),但我的 原始“手动布局”模式更改不再保存
  • 返回“自动布局”模式,然后切换回“手动” “布局”模式似乎没有帮助。即使发生以下情况,问题也会发生: 您只需在原始XML中更改一个空格或删除/重新添加一个字符 文件(基本上,如果XML文件被修改)
要复制,请使用此XML上下文

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:int="http://www.springframework.org/schema/integration" xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

    <int:inbound-channel-adapter id="fileAdapter" ref="fileReadingMessageSource" method="receive" auto-startup="true" channel="files">
        <int:poller fixed-delay="#{T(java.lang.Integer).MAX_VALUE}" />
    </int:inbound-channel-adapter>
    <bean id="fileReadingMessageSource" class="org.springframework.integration.file.FileReadingMessageSource">
        <property name="directory" value="C:/Users/af25830/Desktop/tmg-exchange-gateway-nam/t2" />
    </bean>
    <int:channel id="files" />
    <int:logging-channel-adapter id="logger" level="INFO" logger-name="fileLogger" channel="files" auto-startup="false" />
</beans>
  • 输入“手动布局”并移动某些内容,使其看起来与此类似:
    .settings/com.springsource.sts.config.flow.prefs
    包含:

    //com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/integration\:/spring-integration-test/src/main/resources/META-INF/spring/integration/spring-integration-test-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<graph>\r\n<element clazz\="InboundChannelAdapterModelElement" type\="inbound-channel-adapter">\r\n<structure end\="1038" endstart\="1008" start\="809" startend\="939"/>\r\n<bounds height\="118" width\="120" x\="19" y\="17"/>\r\n</element>\r\n<element clazz\="ChannelModelElement" type\="channel">\r\n<structure end\="1280" endstart\="1280" start\="1254" startend\="1280"/>\r\n<bounds height\="118" width\="120" x\="159" y\="17"/>\r\n</element>\r\n<element clazz\="LoggingChannelAdapterModelElement" type\="logging-channel-adapter">\r\n<structure end\="1401" endstart\="1401" start\="1283" startend\="1401"/>\r\n<bounds height\="118" width\="120" x\="299" y\="17"/>\r\n</element>\r\n</graph>
    
    //com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/integration\:/spring-integration-test/src/main/resources/META-INF/spring/integration/spring-integration-test-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<graph>\r\n<element clazz\="InboundChannelAdapterModelElement" type\="inbound-channel-adapter">\r\n<structure end\="1038" endstart\="1008" start\="809" startend\="939"/>\r\n<bounds height\="118" width\="120" x\="19" y\="17"/>\r\n</element>\r\n<element clazz\="ChannelModelElement" type\="channel">\r\n<structure end\="1280" endstart\="1280" start\="1254" startend\="1280"/>\r\n<bounds height\="118" width\="120" x\="159" y\="17"/>\r\n</element>\r\n<element clazz\="LoggingChannelAdapterModelElement" type\="logging-channel-adapter">\r\n<structure end\="1401" endstart\="1401" start\="1283" startend\="1401"/>\r\n<bounds height\="118" width\="120" x\="337" y\="148"/>\r\n</element>\r\n</graph>
    
    //com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/integration\:/spring-integration-test/src/main/resources/META-INF/spring/integration/spring-integration-test-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<graph>\r\n<element clazz\="InboundChannelAdapterModelElement" type\="inbound-channel-adapter">\r\n<structure end\="1038" endstart\="1008" start\="809" startend\="939"/>\r\n<bounds height\="118" width\="120" x\="19" y\="17"/>\r\n</element>\r\n<element clazz\="ChannelModelElement" type\="channel">\r\n<structure end\="1280" endstart\="1280" start\="1254" startend\="1280"/>\r\n<bounds height\="118" width\="120" x\="159" y\="17"/>\r\n</element>\r\n<element clazz\="LoggingChannelAdapterModelElement" type\="logging-channel-adapter">\r\n<structure end\="1401" endstart\="1401" start\="1283" startend\="1401"/>\r\n<bounds height\="118" width\="120" x\="299" y\="17"/>\r\n</element>\r\n</graph>
    
  • 返回集成图选项卡并转到“手动布局”模式,您将看到您的更改现在已恢复

  • 这是非常常见的,因此,如果在编辑原始XML文件时不恢复“手动布局”编辑,那就太好了


    我是否错过了一个可以防止这种情况发生的步骤?

    很酷,你发现了这一点。我不知道切换到手动布局。它将坐标存储在项目首选项(.settings)文件夹中。但它似乎对我有用。。。原始XML中的更改不会影响手动布局。看起来您遇到了某种bug。如果重新启动STS,手动布局是否保留在图表上?检查yoyr项目中的.settings文件夹下是否有com.springsource.sts.config.flow.prefs文件,其中是否有XML格式的坐标。请注意,自动布局设置是一个影响所有“bean配置”图表的全局首选项。我已经确认,如果退出/重新启动STS,布局将保持不变。如果触及XML源,底层的com.springsource.sts.config.flow.prefs文件最终会被编辑,这基本上会破坏您所做的任何手动编辑。我已经用例子和图表更新了我的问题。托尼,我想我们最好把所有的讨论转移到JIRA问题上。我已经尽力把你的指示转载到吉拉身上了。这是:我仍然无法关闭手动布局,但稍后我会再试一次。谢谢谢谢Alex你帮我省了一点工作。谢谢。