Skip to content

Commit

Permalink
Revert "#49: new References tab to show items referencing the selecte…
Browse files Browse the repository at this point in the history
…d item"

This reverts commit 4e674ba.
  • Loading branch information
lfcnassif committed Jun 25, 2021
1 parent e6b4c01 commit f0f77d3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ NoJavaFX.Error=This application needs JavaFX to be installed!
ProcessingNotFinished.title=Processing not finished
ProcessingNotFinished.message=Processing didn't finish successfully. Many case items could be missing, including allocated.\nTry to resume it with --continue option.
ProcessingNotFinished.cases=\ Following cases are affected:\n
ReferencesTab.Title=\ Referências
ResultTableModel.bookmark=bookmark
ResultTableModel.score=score
ReportDialog.AddToReport=Add to existing report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ ProcessingNotFinished.cases=\ Os seguintes casos s
ResultTableModel.bookmark=marcador
ResultTableModel.score=score
ParentTableModel.ParentCount=Item Pai
ReferencesTab.Title=\ References
ResultTableModel.DateFormat=dd/MM/yyyy HH:mm:ss z
ResultTableModel.Error=ERRO
ResultTableModel.FATDateFormat=dd/MM/yyyy
Expand Down
36 changes: 4 additions & 32 deletions iped-app/src/main/java/dpf/sp/gpinf/indexer/desktop/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public class App extends JFrame implements WindowListener, IMultiSearchResultPro
public HitsTable hitsTable;
AppGraphAnalytics appGraphAnalytics;

HitsTable subItemTable, duplicatesTable, referencesTable;
HitsTable subItemTable, duplicatesTable;
JTree tree, bookmarksTree, categoryTree;
MetadataPanel metadataPanel;
JScrollPane categoriesPanel, bookmarksPanel;
Expand All @@ -184,7 +184,7 @@ public class App extends JFrame implements WindowListener, IMultiSearchResultPro
List<DefaultSingleCDockable> rsTabDock = new ArrayList<DefaultSingleCDockable>();

DefaultSingleCDockable tableTabDock, galleryTabDock, graphDock;
public DefaultSingleCDockable hitsDock, subitemDock, parentDock, duplicateDock, referencesDock;
public DefaultSingleCDockable hitsDock, subitemDock, parentDock, duplicateDock;
DefaultSingleCDockable compositeViewerDock;

private List<DefaultSingleCDockable> viewerDocks;
Expand All @@ -194,20 +194,17 @@ public class App extends JFrame implements WindowListener, IMultiSearchResultPro
Color defaultColor;
Color defaultFocusedColor;
Color defaultSelectedColor;
private JScrollPane hitsScroll, subItemScroll, parentItemScroll, duplicatesScroll, referencesScroll;
private JScrollPane hitsScroll, subItemScroll, parentItemScroll, duplicatesScroll;
JScrollPane viewerScroll, resultsScroll, galleryScroll;
JPanel topPanel;
ClearFilterButton clearAllFilters;
boolean disposicaoVertical = false;

public ResultTableModel resultsModel;
List resultSortKeys;

SubitemTableModel subItemModel = new SubitemTableModel();
ParentTableModel parentItemModel = new ParentTableModel();
DuplicatesTableModel duplicatesModel = new DuplicatesTableModel();
ReferencesTableModel referencesModel = new ReferencesTableModel();

GalleryModel galleryModel = new GalleryModel();

Color alertColor = Color.RED;
Expand Down Expand Up @@ -586,18 +583,6 @@ public void componentResized(ComponentEvent e) {
parentItemTable.getTableHeader().setPreferredSize(new Dimension(0, 0));
parentItemTable.setShowGrid(false);

referencesTable = new HitsTable(referencesModel);
referencesTable.setFillsViewportHeight(true);
referencesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
referencesTable.getColumnModel().getColumn(0).setPreferredWidth(40);
referencesTable.getColumnModel().getColumn(1).setPreferredWidth(20);
referencesTable.getColumnModel().getColumn(2).setPreferredWidth(1500);
referencesTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
referencesTable.setDefaultRenderer(String.class, new TableCellRenderer());
referencesTable.getTableHeader().setPreferredSize(new Dimension(0, 0));
referencesTable.setShowGrid(false);
referencesScroll = new JScrollPane(referencesTable);

categoryTree = new JTree(new Object[0]);
categoryTree.setRootVisible(true);
categoryTree.setExpandsSelectedPaths(false);
Expand Down Expand Up @@ -746,8 +731,6 @@ public TabPanePainter createDecorationPainter(EclipseTabPane pane) {
parentItemTable.getSelectionModel().addListSelectionListener(parentItemModel);
duplicatesTable.addMouseListener(duplicatesModel);
duplicatesTable.getSelectionModel().addListSelectionListener(duplicatesModel);
referencesTable.addMouseListener(referencesModel);
referencesTable.getSelectionModel().addListSelectionListener(referencesModel);

hitsTable.addMouseListener(appletListener);
// filtro.addMouseListener(appletListener);
Expand Down Expand Up @@ -897,8 +880,6 @@ public void changed(CDockableLocationEvent event) {
parentItemScroll);
duplicateDock = createDockable("duplicatestab", Messages.getString("DuplicatesTableModel.Duplicates"), //$NON-NLS-1$ //$NON-NLS-2$
duplicatesScroll);
referencesDock = createDockable("referencedbytab", Messages.getString("ReferencesTab.Title"),
referencesScroll);

dockingControl.addDockable(categoriesTabDock);
dockingControl.addDockable(metadataTabDock);
Expand All @@ -921,7 +902,6 @@ public void changed(CDockableLocationEvent event) {
dockingControl.addDockable(subitemDock);
dockingControl.addDockable(duplicateDock);
dockingControl.addDockable(parentDock);
dockingControl.addDockable(referencesDock);

List<Viewer> viewers = viewerController.getViewers();
viewerDocks = new ArrayList<DefaultSingleCDockable>();
Expand Down Expand Up @@ -1041,7 +1021,7 @@ private void removeAllDockables() {

List<DefaultSingleCDockable> docks = new ArrayList<>();
docks.addAll(Arrays.asList(hitsDock, subitemDock, duplicateDock, parentDock, tableTabDock, galleryTabDock,
bookmarksTabDock, evidenceTabDock, metadataTabDock, categoriesTabDock, graphDock, referencesDock));
bookmarksTabDock, evidenceTabDock, metadataTabDock, categoriesTabDock, graphDock));
docks.addAll(viewerDocks);
docks.addAll(rsTabDock);
rsTabDock.clear();
Expand Down Expand Up @@ -1216,10 +1196,6 @@ public void refazLayout(boolean remove) {

duplicateDock.setLocation(nextLocation);
duplicateDock.setVisible(true);
nextLocation = duplicateDock.getBaseLocation().aside();

referencesDock.setLocation(nextLocation);
referencesDock.setVisible(true);

for (int i = 0; i < viewerDocks.size(); i++) {
DefaultSingleCDockable dock = viewerDocks.get(i);
Expand Down Expand Up @@ -1293,10 +1269,6 @@ public void refazLayout(boolean remove) {

duplicateDock.setLocation(nextLocation);
duplicateDock.setVisible(true);
nextLocation = duplicateDock.getBaseLocation().aside();

referencesDock.setLocation(nextLocation);
referencesDock.setVisible(true);

categoriesTabDock.setLocation(CLocation.base().normalWest(0.20).north(0.5));
categoriesTabDock.setVisible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public void updateFileListing(Query query) {
App.get().subitemDock.setTitleText(Messages.getString("SubitemTableModel.Subitens")); //$NON-NLS-1$
App.get().duplicateDock.setTitleText(Messages.getString("DuplicatesTableModel.Duplicates")); //$NON-NLS-1$
App.get().parentDock.setTitleText(Messages.getString("ParentTableModel.ParentCount")); //$NON-NLS-1$
App.get().referencesDock.setTitleText(Messages.getString("ReferencesTab.Title")); //$NON-NLS-1$
App.get().status.setText(" "); //$NON-NLS-1$

App.get().getViewerController().clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,14 @@ private void process() {
App.get().getViewerController().loadFile(item, viewItem, contentType, highlights);

if (listRelated) {
// listRelatedItens();
App.get().subItemModel.listSubItens(doc);
if (Thread.currentThread().isInterrupted()) {
return;
}
App.get().parentItemModel.listParents(doc);

App.get().duplicatesModel.listDuplicates(doc);

App.get().referencesModel.listReferencingItems(doc);
}
}

Expand Down Expand Up @@ -219,4 +218,31 @@ public void run() {
}
}

private Thread listTask;

private void listRelatedItens() {
if (listTask != null) {
listTask.interrupt();
}

listTask = new Thread(new Runnable() {
@Override
public void run() {
synchronized (lock2) {
App.get().subItemModel.listSubItens(doc);
if (Thread.currentThread().isInterrupted()) {
return;
}
App.get().parentItemModel.listParents(doc);
App.get().duplicatesModel.listDuplicates(doc);
}

}
});
synchronized (lock2) {
listTask.start();
}

}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ private synchronized void processSelectedFile() {
App.get().subitemDock.setTitleText(Messages.getString("SubitemTableModel.Subitens")); //$NON-NLS-1$
App.get().duplicateDock.setTitleText(Messages.getString("DuplicatesTableModel.Duplicates")); //$NON-NLS-1$
App.get().parentDock.setTitleText(Messages.getString("ParentTableModel.ParentCount")); //$NON-NLS-1$
App.get().referencesDock.setTitleText(Messages.getString("ReferencesTab.Title")); //$NON-NLS-1$

FileProcessor parsingTask = new FileProcessor(docId, true);
parsingTask.execute();
Expand Down

0 comments on commit f0f77d3

Please sign in to comment.