Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
asm
eclipse-plugin
Commits
926ba83d
Commit
926ba83d
authored
Jul 02, 2008
by
andrei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quickfix for bug 308066 (accessing with non existing offset to the document info)
parent
0709c15c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/de/loskutov/bco/editors/BytecodeClassFileEditor.java
src/de/loskutov/bco/editors/BytecodeClassFileEditor.java
+10
-8
No files found.
src/de/loskutov/bco/editors/BytecodeClassFileEditor.java
View file @
926ba83d
/* $Id: BytecodeClassFileEditor.java,v 1.
8
2008-0
5-15 21:31:58
andrei Exp $ */
/* $Id: BytecodeClassFileEditor.java,v 1.
9
2008-0
7-02 19:18:35
andrei Exp $ */
package
de.loskutov.bco.editors
;
...
...
@@ -65,11 +65,11 @@ public class BytecodeClassFileEditor extends ClassFileEditor
ClassFileDocumentProvider
.
InputChangeListener
{
private
Composite
fViewerComposite
;
private
InputUpdater
fInputUpdater
;
private
final
InputUpdater
fInputUpdater
;
public
static
final
String
ID
=
"de.loskutov.bco.editors.BytecodeClassFileEditor"
;
public
static
final
String
MARK
=
"// class version "
;
/** the modes (flags) for the decompiler */
private
BitSet
decompilerFlags
;
private
final
BitSet
decompilerFlags
;
/** is not null only on class files with decompiled source */
private
static
BytecodeSourceMapper
sourceMapper
;
private
BytecodeDocumentProvider
fClassFileDocumentProvider
;
...
...
@@ -338,11 +338,13 @@ public class BytecodeClassFileEditor extends ClassFileEditor
getEditorInput
());
try
{
// XXX have test if the requested line is from bytecode or sourcecode?!?
int
lineAtOffset
=
document
.
getLineOfOffset
(
offset
);
// get DecompiledMethod from line, then get JavaElement with same
// signature, because we do not have offsets or lines in the class file,
// only java elements...
result
=
getSourceMapper
().
findElement
(
classFile
,
lineAtOffset
);
if
(
document
.
getLength
()
>
offset
){
int
lineAtOffset
=
document
.
getLineOfOffset
(
offset
);
// get DecompiledMethod from line, then get JavaElement with same
// signature, because we do not have offsets or lines in the class file,
// only java elements...
result
=
getSourceMapper
().
findElement
(
classFile
,
lineAtOffset
);
}
}
catch
(
BadLocationException
e
)
{
BytecodeOutlinePlugin
.
log
(
e
,
IStatus
.
ERROR
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment