From: <bh...@us...> - 2006-09-13 20:49:41
|
Revision: 183 http://svn.sourceforge.net/cishell/?rev=183&view=rev Author: bh2 Date: 2006-09-13 13:49:38 -0700 (Wed, 13 Sep 2006) Log Message: ----------- got rid of unused variables in LogView Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java Modified: trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-09-13 20:47:59 UTC (rev 182) +++ trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-09-13 20:49:38 UTC (rev 183) @@ -18,54 +18,46 @@ import java.util.HashMap; import java.util.Map; -//osgi -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.service.log.LogEntry; -import org.osgi.service.log.LogListener; -import org.osgi.service.log.LogReaderService; -import org.osgi.service.log.LogService; - -//eclipse import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.custom.StyleRange; +import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.dnd.Clipboard; import org.eclipse.swt.dnd.TextTransfer; import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseMoveListener; -import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Cursor; import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.program.Program; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; -import org.eclipse.swt.program.Program; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.part.ViewPart; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.service.log.LogEntry; +import org.osgi.service.log.LogListener; +import org.osgi.service.log.LogReaderService; +import org.osgi.service.log.LogService; /** * @author Weixia Huang (hu...@in...) * Bruce Herr (bh...@bh...) */ -public class LogView extends ViewPart implements LogListener{ - private static LogReaderService reader; - +public class LogView extends ViewPart implements LogListener{ private static LogView defaultView; private static Composite parent; private static StyledText text; - private static int defaultLevel; - private static int currentLevel; - private static Map colorMapping; private static Color URL_COLOR; private static Color LOG_ERROR_COLOR; @@ -96,7 +88,6 @@ */ public LogView() { defaultView = this; - defaultLevel = LogService.LOG_INFO; //TODO: Need to set the log level based on preferences service /* Configuration cfg = IVC.getInstance().getConfiguration(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-09-26 19:09:32
|
Revision: 208 http://svn.sourceforge.net/cishell/?rev=208&view=rev Author: bh2 Date: 2006-09-26 12:09:27 -0700 (Tue, 26 Sep 2006) Log Message: ----------- Fixed bug with log view to fix some nasty NPEs Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java Modified: trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-09-26 18:43:44 UTC (rev 207) +++ trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-09-26 19:09:27 UTC (rev 208) @@ -307,7 +307,7 @@ Integer offset = offsets[i]; String url = (String) offsetToUrlMap.get(offset); - if ((position >= offset.intValue()) && + if (offset != null && url != null && (position >= offset.intValue()) && (position <= (offset.intValue() + url.length()))) { overURL = true; @@ -358,7 +358,7 @@ Integer offset = offsets[i]; String url = (String) offsetToUrlMap.get(offset); - if ((clicked >= offset.intValue()) && + if (url != null && (clicked >= offset.intValue()) && (clicked <= (offset.intValue() + url.length()))) { try { Program.launch(url); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2006-10-25 04:56:21
|
Revision: 315 http://svn.sourceforge.net/cishell/?rev=315&view=rev Author: huangb Date: 2006-10-24 21:56:16 -0700 (Tue, 24 Oct 2006) Log Message: ----------- handle url starting with https Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java Modified: trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-10-24 17:22:45 UTC (rev 314) +++ trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2006-10-25 04:56:16 UTC (rev 315) @@ -218,8 +218,10 @@ */ private void appendString(String message, Color color) { int index = message.indexOf("http://"); - if (index == -1) { + index = message.indexOf("https://"); + } + if (index == -1) { index = message.indexOf("www."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-03-15 21:30:59
|
Revision: 378 http://svn.sourceforge.net/cishell/?rev=378&view=rev Author: huangb Date: 2007-03-15 14:30:57 -0700 (Thu, 15 Mar 2007) Log Message: ----------- exclude ")" from highlighted url. Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java Modified: trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2007-03-15 21:28:27 UTC (rev 377) +++ trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2007-03-15 21:30:57 UTC (rev 378) @@ -228,7 +228,10 @@ if (index > -1) { String url = message.substring(index); - if (url.indexOf(" ") > -1) { + if (url.indexOf(") ") > -1) { + url = url.substring(0, url.indexOf(") ")); + } + else if (url.indexOf(" ") > -1) { url = url.substring(0, url.indexOf(" ")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-07-02 16:11:30
|
Revision: 410 http://svn.sourceforge.net/cishell/?rev=410&view=rev Author: huangb Date: 2007-07-02 09:11:22 -0700 (Mon, 02 Jul 2007) Log Message: ----------- a small update, adjust log message layout in the console window Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java Modified: trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2007-07-01 15:00:14 UTC (rev 409) +++ trunk/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java 2007-07-02 16:11:22 UTC (rev 410) @@ -188,7 +188,8 @@ if (goodMessage(message)) { //not all messages end w/ a new line, but they //need to to print properly - message += "\n"; + if (!message.endsWith("\n")) + message += "\n"; appendString(message, (Color) colorMapping.get(""+entry.getLevel())); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |