我无法从Eclipse配置中删除Subclipse.
由于m2eclipse项目放弃了对Subclipse的支持,我决定切换到Subversive.
所以我卸载了Subclipse,然后使用About Eclipse - > Installation Details - > Uninstall方法安装Subversive.现在,当我进入任何与Team相关的选项/任务/首选项时,有两个可用的SVN选项(一个用于Subversive,一个用于Subclipse)使生活变得混乱.
抓住.metadata
字符串的工作区文件夹后,subclipse
我可以看到配置仍然充斥着对Subclipse的引用:
$ grep -lir "subclipse" .metadata/
.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload17.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload23.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload21.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload19.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload22.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload14.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload13.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload20.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload18.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload16.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload15.csv
.metadata/.plugins/org.eclipse.team.ui/dialog_settings.xml
.metadata/.plugins/org.eclipse.team.ui/syncParticipants.xml
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.lazy
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.state
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.pluginInfo
.metadata/.plugins/org.eclipse.core.resources/.projects/jxse-tutorials/.syncinfo.snap
.metadata/.plugins/org.eclipse.core.resources/.projects/jxse-tutorials/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/BA_NAT_Traversal/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/barchart-udt/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/barchart-udt/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/netty-benchmark/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/netty-benchmark/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/jxta/.syncinfo.snap
.metadata/.plugins/org.eclipse.core.resources/.root/73.tree
.metadata/.plugins/org.eclipse.core.resources/.snap
.metadata/.bak_0.log
Run Code Online (Sandbox Code Playgroud)
上面的所有项目现在都与SVN断开连接.显然有些参考文献如usagedata并不重要,但我更担心的是XML文件.手动浏览并删除与Subclipse相关的所有标签/属性是否安全?我觉得这种做法可能是不明智的.
有没有人知道如何在不丢失工作空间的情况下消除Subclipse的所有痕迹?关于我可能做错了什么的任何提示?在切换到Subversive之前,我是否应该手动断开所有SVN项目?
我正在尝试基于a创建自定义UI JWindow
,以便选择要共享的屏幕区域.我已经扩展JWindow
并添加了代码以使其可调整大小并使用"切出"窗口的中心AWTUtilities.setWindowShape()
.
当运行代码时,我正在经历闪烁,因为窗口在负x和y方向上调整大小,即向上和向左.似乎正在发生的是在更新组件之前调整窗口大小并绘制窗口.下面是代码的简化版本.运行时,顶部面板可用于向上和向左调整窗口大小.窗口的背景设置为绿色,以清楚显示我不想显示的像素的位置.
编辑:改进代码以使用a正确地塑造窗口,ComponentListener
并在底部添加虚拟组件以进一步说明闪烁(也更新了屏幕截图).
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.Area;
import javax.swing.JPanel;
import javax.swing.JWindow;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import javax.swing.border.LineBorder;
import com.sun.awt.AWTUtilities;
public class FlickerWindow extends JWindow implements MouseListener, MouseMotionListener{
JPanel controlPanel;
JPanel outlinePanel;
int mouseX, mouseY;
Rectangle windowRect;
Rectangle cutoutRect;
Area windowArea;
public static void main(String[] args) {
FlickerWindow fw = new FlickerWindow();
}
public …
Run Code Online (Sandbox Code Playgroud) 我有一个在一个单独的线程中初始化的对象.在填充本地数据库时,初始化可能需要几秒钟.
SpecialAnalysis currentAnalysis = new SpecialAnalysis(params_here);
Run Code Online (Sandbox Code Playgroud)
我正在尝试实现一个"取消"按钮,它将对象的isCancelled
布尔值设置为true.实现这个的正确Java方法是什么?
while (currentAnalysis == null) {
}
currentAnalysis.cancel();
Run Code Online (Sandbox Code Playgroud)
该方法冻结了程序,因为它似乎进入了计算效率低下的循环.这是我可以使用的情况Object.wait()
吗?
我目前的糟糕/半成功的解决方案是:
while (currentAnalysis == null) {
Thread.sleep(500);
}
currentAnalysis.cancel();
Run Code Online (Sandbox Code Playgroud)
谢谢!
JXTA 项目还活跃吗?我正在寻找一个好的开源点对点解决方案,找到了 JXTA 文章,但是“jxta.org”不起作用,它还活着吗?或者把它移到其他地方了?