use of com.kyj.scm.manager.svn.java.SVNWcDbClient in project Gargoyle by callakrsos.
the class SystemLayoutViewController method menuItemCodeAnalysisMenuItemOnAction.
/********************************
* 작성일 : 2016. 5. 29. 작성자 : KYJ
*
* TODO 자바 코드 분석기 테스트단계.
*
* @param e
********************************/
public void menuItemCodeAnalysisMenuItemOnAction(ActionEvent e) {
TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
if (selectedItem != null) {
FileWrapper value = selectedItem.getValue();
File sourceFile = value.getFile();
// if(selectedItem instanceof JavaProjectMemberFileTreeItem)
{
if (value.isSVNConnected()) {
File wcDbFile = value.getWcDbFile();
if (wcDbFile != null && wcDbFile.exists()) {
SVNWcDbClient client;
try {
client = new SVNWcDbClient(wcDbFile);
// TODO 코드 완성시키기.
// new SVNFileHistoryComposite(
// JavaSVNManager.createNewInstance(client.getUrl())
// , sourceFile);
// new JavaSVNManager(new Properties(defaults))
} catch (Exception e1) {
LOGGER.error(ValueUtil.toString(e1));
}
}
}
}
if (sourceFile != null && sourceFile.exists()) {
try {
if (FileUtil.isJavaFile(sourceFile)) {
JavaProjectFileTreeItem javaProjectFileTreeItem = FileUtil.toJavaProjectFileTreeItem(selectedItem);
if (javaProjectFileTreeItem != null) {
Tab tab = new Tab(sourceFile.getName(), new CodeAnalysisJavaTextArea(sourceFile));
SpecResource resource = new SpecResource(javaProjectFileTreeItem.getValue().getFile(), sourceFile);
SpecTabPane newInstance = new SpecTabPane(resource, tab);
loadNewSystemTab(sourceFile.getName(), newInstance);
}
} else {
DialogUtil.showMessageDialog("자바 파일이 아닙니다.");
}
} catch (Exception ex) {
DialogUtil.showExceptionDailog(ex);
}
}
}
}
use of com.kyj.scm.manager.svn.java.SVNWcDbClient in project Gargoyle by callakrsos.
the class SystemLayoutViewController method menuItemSCMGraphsOnAction.
/**
* SCM Graph분석 화면을 생성후 보여주는 처리를 함.
*
* @작성자 : KYJ
* @작성일 : 2016. 7. 21.
* @param event
*/
public void menuItemSCMGraphsOnAction(ActionEvent event) {
TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
if (selectedItem != null) {
FileWrapper value = selectedItem.getValue();
if (value.isSVNConnected()) {
File wcDbFile = value.getWcDbFile();
if (wcDbFile.exists()) {
try {
SVNWcDbClient client = new SVNWcDbClient(wcDbFile);
String rootUrl = client.getUrl();
LOGGER.debug("root URL : {}", rootUrl);
Properties properties = new Properties();
properties.put(JavaSVNManager.SVN_URL, rootUrl);
loadNewSystemTab("Scm Graph", FxUtil.createSVNGraph(properties));
} catch (GargoyleException e) {
LOGGER.error(ValueUtil.toString(e));
DialogUtil.showExceptionDailog(e, e.getErrorCode().getCodeMessage());
} catch (Exception e) {
}
}
}
}
}
use of com.kyj.scm.manager.svn.java.SVNWcDbClient in project Gargoyle by callakrsos.
the class SVNWcDbClientTest method simple.
/********************************
* 작성일 : 2016. 7. 18. 작성자 : KYJ
*
* wc.db파일로부터 SVN URL정보를 가져옴.
*
* @throws Exception
********************************/
@Test
public void simple() throws Exception {
SVNWcDbClient client = new SVNWcDbClient(new File("C:\\Users\\KYJ\\eclipse-jee-neon\\workspace\\AnimationRecorder\\.svn\\wc.db"));
System.out.println(client.getUrl());
Assert.assertNotNull(client.getUrl());
}
Aggregations